Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

搜索框无法搜索的问题 #51

Closed
bubifengyun opened this issue Sep 24, 2017 · 2 comments
Closed

搜索框无法搜索的问题 #51

bubifengyun opened this issue Sep 24, 2017 · 2 comments

Comments

@bubifengyun
Copy link
Contributor

测试网站的搜索是可以用的,自己搭建则无法搜索。经过测试发现,发现提交框有问题。网上说,http://m.111cn.net/art-52942.htm

页面通过表单(form)想服务器提交数据的时候有两种形式,一个是POST,另一个是GET。两种的一个区别是GET会直接把数据附加在url的后面,而POST发送的数据放置在http包中。form的action属性就是提交数据的url地址,method属性可以指定是GET或POST。
需要注意的是如果采用GET方式,那么action url中参数都会被丢弃,提交时候只会把form中的数据拼接在url向服务器提交;但是POST的方式则不会这样,它会按照action指定的url进行提交数据,包含url后面跟着的参数和参数值

跟设置的路由有关,也就是说urlManager配置不带r=,才可以。特此提醒一下,谢谢。

@bubifengyun
Copy link
Contributor Author

也就是说

'enablePrettyUrl'=> true才可以搜索,谢谢。

@yidashi
Copy link
Owner

yidashi commented Sep 25, 2017

嗯,已解决此bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants