开发者

GET params with URI rounting/ Codeigniter

开发者 https://www.devze.com 2023-01-30 07:56 出处:网络
$route[\'ajax/get/mail\'] = \"mail/get_mail_by_params\"; I am trying to request *ajax/get/mail?user_id=123&foo=bar&bar=foo*
$route['ajax/get/mail'] = "mail/get_mail_by_params"; 

I am trying to request *ajax/get/mail?user_id=123&foo=bar&bar=foo*

And params it in controller:

$foo = $this->input->get('foo') 

But $_GET in ajax/get/mail variable is empty!

I suggest, that routing doesn’t supports GET parame开发者_JS百科ts. What to do?


Have you tried using the MY_Input library? http://codeigniter.com/wiki/MY_Input/

Also, I think you may need to update your URI Protocol in config.php to PATH_INFO.

$config['uri_protocol'] = "PATH_INFO";

0

精彩评论

暂无评论...
验证码 换一张
取 消