首先找到wordpress的wp-includes目录下-》class-wp.php文件,进行如下修改就可以解决在Windows系统下部分中文标签无法打开的情况。
wp-includes/class-wp.php 153 行:
1 |
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : ''; |
修改为:
1 |
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'],'utf-8', 'GBK') : ''; |
wp-includes/class-wp.php 157 行:
1 |
list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] ); |
修改为:
1 |
list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], 'utf-8','GBK') ); |
最好用notepad或者类似工具修改,修改后保存刷新即可,参照本站中文tag:https://blog.lanluo.cn/腾讯问卷
原创文章,作者:蓝洛水深,如若转载,请注明出处:https://blog.lanluo.cn/3491