您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

think关于php的pathinfo的一点疑问

2025/6/1 12:36:17发布30次查看
首先应该说一下,可能与thinkphp框架路由解析代码无关,大家如果有兴趣可以测试一下
[request_uri]=> string(19) /wgh/wgh/index.html [script_name]=> string(10) /index.php [path_info]=> string(19) /wgh/wgh/index.html [path_translated]=> string(49) redirect:\index.php\wgh\wgh\index.html\index.html [php_self]=> string(29) /index.php/wgh/wgh/index.html

以上代码是在项目入口文件输出的部分$_server信息
当apache开启了伪静态然后使用了.htaccess 将所有的路径指向index.php后
# 将 rewriteengine 模式打开rewriteengine onrewritebase /#禁止显示目录列表options -indexes# rewrite 系统规则请勿修改rewritecond %{query_string} ^(.*)$rewritecond %{request_filename} !-drewritecond %{request_filename} !-frewriterule ^(.*)$ index.php/$1 [qsa,pt,l]

发现当项目的路径d:\wgh\ 为小写字母时,在水平凡cms1.0(基于thinkphp3.1.3)中增加模块wgh模块时 会提示没有安装此模块
我debug很久之后,也没有找到原因,但是将水平凡cms的appcheckbehavior驱动中的group_name使用ucwords()大写后正常,点击水平凡的其他模块也正常进入页面,唯独wgh模块不行,将web根目录从wgh更改为xxx后正常。
有哪位大神给讲解一下pathinfo为啥不会出现这个原因。
忘记说我的系统是win8.1 amp套件用的是phpstudy 更换upupw后仍然重复上述问题。
回复内容: 首先应该说一下,可能与thinkphp框架路由解析代码无关,大家如果有兴趣可以测试一下
[request_uri]=> string(19) /wgh/wgh/index.html [script_name]=> string(10) /index.php [path_info]=> string(19) /wgh/wgh/index.html [path_translated]=> string(49) redirect:\index.php\wgh\wgh\index.html\index.html [php_self]=> string(29) /index.php/wgh/wgh/index.html

以上代码是在项目入口文件输出的部分$_server信息
当apache开启了伪静态然后使用了.htaccess 将所有的路径指向index.php后
# 将 rewriteengine 模式打开rewriteengine onrewritebase /#禁止显示目录列表options -indexes# rewrite 系统规则请勿修改rewritecond %{query_string} ^(.*)$rewritecond %{request_filename} !-drewritecond %{request_filename} !-frewriterule ^(.*)$ index.php/$1 [qsa,pt,l]

发现当项目的路径d:\wgh\ 为小写字母时,在水平凡cms1.0(基于thinkphp3.1.3)中增加模块wgh模块时 会提示没有安装此模块
我debug很久之后,也没有找到原因,但是将水平凡cms的appcheckbehavior驱动中的group_name使用ucwords()大写后正常,点击水平凡的其他模块也正常进入页面,唯独wgh模块不行,将web根目录从wgh更改为xxx后正常。
有哪位大神给讲解一下pathinfo为啥不会出现这个原因。
忘记说我的系统是win8.1 amp套件用的是phpstudy 更换upupw后仍然重复上述问题。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product