codeigniter及其uri协议 [英] codeigniter and its uri protocol
问题描述
处理一些代码 - 当我更改
heres some code- when i change
$config['uri_protocol'] = "AUTO";
到
$config['uri_protocol'] = "PATH_INFO";
我的控制器全部默认为默认控制器..因此domain.com/admin默认为domain.com and domain.com/users默认为默认控制器
My controllers all default to the default controller.. hence domain.com/admin defaults to domain.com and domain.com/users defaults to the default controller
哪里出错?
推荐答案
$ _ SERVER ['PATH_INFO']
或 getenv('PATH_INFO'])
组?如果一切都进入默认控制器,那么这应该是因为 PATH_INFO
变量没有超出你的期望,或者路由有问题,这应该导致在 AUTO
上的相同情况下。
Is $_SERVER['PATH_INFO']
or getenv('PATH_INFO'])
actually set? If everything goes to the default controller, then this should be because either the PATH_INFO
variable is not being past as you expect, or there is an issue with the routing, which should result in the same situation on AUTO
.
这篇关于codeigniter及其uri协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!