ayzen 发表于 2014-7-4 10:35:19

php5.5.9 路由问题 如何解决?

例如url为:http://www.a.com/index.php/login/index

因为在php5.5.9版本 获取的$_SERVER['SCRIPT_NAME']的值是/index.php/login/index而不是/index.php
导致
system->core->URI.php 类里面 _detect_uri()函数 返回空值
获取不到正确的控制器,一直进去默认的控制器

请问如何解决这个问题?
难道要降低php版本嘛?

wlyx 发表于 2014-7-4 15:51:30

config.php 文件修改配置

$config['uri_protocol']        = 'REQUEST_URI';

ayzen 发表于 2014-7-4 16:56:45

wlyx 发表于 2014-7-4 15:51
config.php 文件修改配置

$config['uri_protocol']        = 'REQUEST_URI';

测试过了,不行

Fight 发表于 2014-7-5 08:58:06

嘿,建议你开启重写

ayzen 发表于 2014-7-8 09:20:14

暂时解决办法把enable_query_strings打开,不用路由

IvanCI 发表于 2014-7-10 10:30:56

path info 配置错误?

Hex 发表于 2014-7-10 10:40:24

CI 貌似不支持 5.5 吧。
页: [1]
查看完整版本: php5.5.9 路由问题 如何解决?