Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CakePHP设计url_Url_Cakephp 2.0 - Fatal编程技术网

CakePHP设计url

CakePHP设计url,url,cakephp-2.0,Url,Cakephp 2.0,在我的CakePHP环境中,我有一个reuqest,它来自一个带有“get”方法的表单。当我发送表单时,控制器转到 http://www.example.com/circles/index?searchterm=something 代替cakestyle http://www.example.com/circles/index/searchterm:something 我不知道我要去哪里找。Url重定向工作正常。仅当我使用“get”方法发送请求时 谢谢你的帮助 Ivo因为get请求参数与ur

在我的CakePHP环境中,我有一个reuqest,它来自一个带有“get”方法的表单。当我发送表单时,控制器转到

http://www.example.com/circles/index?searchterm=something
代替cakestyle

http://www.example.com/circles/index/searchterm:something
我不知道我要去哪里找。Url重定向工作正常。仅当我使用“get”方法发送请求时

谢谢你的帮助


Ivo因为get请求参数与url一起作为查询字符串。如果要将这些值作为命名参数获取。然后您必须做一些jQuery工作。例如:您应该将提交方法更改为post,并在提交时获取字段值,创建一个您想要的url,然后您可以通过jQuery提交。

谢谢。我已经读到,在版本3.0中,命名参数将不再存在。所以我使用标准的查询工具。