首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
PHP
最近学习使用 CodeIgniter 这个框架,遇到一个 router 使用 urlcode 的问题
hippoboy
·
2016-10-13 14:59:18 +08:00
· 1480 次点击
这是一个创建于 2916 天前的主题,其中的信息可能已经有所发展或是发生改变。
举个栗子:
我使用 /index.php/test/test 可以正常访问
/index.php%2ftest%2ftest 却不正常,返回 404Object not found!
我不知道是哪里出了问题?我的环境是 Ubuntu+Nginx
请指教,谢谢.
fTest
test
Ubuntu
Object
4 条回复
•
2016-10-13 15:14:38 +08:00
1
inmyfree
2016-10-13 15:02:34 +08:00
本来就是, /index.php/test/test 访问的是 index.php 文件
但是 /index.php%2ftest%2ftest 访问的是 index.php%2ftest%2ftest 文件
2
enenaaa
2016-10-13 15:05:42 +08:00
1
你为什么会以为 %2f 应该自动转码为'/' ?
3
hippoboy
OP
2016-10-13 15:14:03 +08:00
@
inmyfree
恍然大悟,感谢
4
hippoboy
OP
2016-10-13 15:14:38 +08:00
@
enenaaa
原来不能自动转码...恕我无知:-)....
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
2486 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms ·
UTC 09:32
·
PVG 17:32
·
LAX 02:32
·
JFK 05:32
Developed with
CodeLauncher
♥ Do have faith in what you're doing.