用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1432|回复: 1
收起左侧

[HELP] 遇到一个汉字作为url的奇怪问题

[复制链接]
发表于 2015-8-22 11:52:06 | 显示全部楼层 |阅读模式
我是用route把请求映射到Controller的,大体流程如下
配置了一个$route['list_(:num)_(:any)_(:num).html']="welcome/new/$1/$2/$3";  这么个路由,
结果访问test.com/index.php/1_免_1.html的时候,提示404
如果访问test.com/index.php/1_费_1.html得时候就正常,
免字和费字有什么差别呢?
话说在ie下urlencode了也不行
test.com/index.php/1_%E5%85%8D_1.html  这个是免字
test.com/index.php/1_%E8%B4%B9_1.html  这个是费字


不懂 求解答


发表于 2015-8-23 12:19:46 | 显示全部楼层
不建议汉字作为pathinfo方式传值,如果真的需要的话,这个也是错的,test.com/index.php/1_免_1.html应该是test.com/index.php/1/免/1.html这样。而且你还要在application/config/config.php设置好URL允许的字符。

本版积分规则