需要设置url重写,和在index.php文件使用iconv函数
require_once iconv(utf-8,gbk,$_get[url]);
目录结构如下
在.htaccess文件配置
<ifmodule mod_rewrite.c> options +followsymlinks -multiviews rewriteengine on #rewritecond %{request_filename} !-d #rewritecond %{request_filename} !-f
rewriterule ^(.*(php)+.*)$ index.php?url=$1 [qsa,pt,l]
</ifmodule>
这样就可以咯
相关推荐:
php的函数没法获得中文路径中的目录部分及文件名部分
php中的dirname等函数无法处理中文路径
中文路径导致unitpngfix.js不正常的解决方法_基础知识
以上就是window版php支持中文路径访问的方法的详细内容。