我的
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
),
在做这个CAutoComplete时出现$_GET[‘q’]值为空,
这里有几种情形:
'urlManager'=>array(
//'urlFormat'=>'path',
'showScriptName'=>false,
),
url的形式为:?r=call_logs/admin
这时我取得的$_GET值不仅有controller/action($_GET[‘r’])这对值,还有ajax发送的请求值,诸如$_GET[‘q’]和$_GET[‘limit’]
'urlManager'=>array(
'urlFormat'=>'path',
//'showScriptName'=>false,
),
url形式为:index.php/call_logs/admin
我能获取$_GET值,并且只是ajax的值:诸如$_GET[‘q’],$_GET[‘limit’]之类的。
但是问题来了:就如同我以上所说的那样:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
),
此时我的$_GET值中只有$_GET[‘r’]即路由控制器了,ajax的值一点也没有获取。
那么我现在该如何取得ajax发送到值呢?
谢谢!
补充一点:
一般这样传值的url路径应该这这样:
http://127.0.0.1/callcenter/call_logs/autoCompleteCustomer/q/q/limit/10/timestamp/1248838330420
可我发送ajax请求的页面url变成:
http://127.0.0.1/callcenter/call_logs/autoCompleteCustomer?q=q&limit=10×tamp=1248838330420