一聚教程网:一个值得你收藏的教程网站

热门教程

WordPress url中文汉字404解决方法

时间:2022-06-25 18:57:48 编辑:袖梨 来源:一聚教程网

在wp-includes文件夹下找到class-wp.php文件!Download下来!
PS:修改前请先备份!否则后果自负!!!

PHP:

 代码如下 复制代码

$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';

把上面那句代码注释掉替换成下面那句

PHP:

 代码如下 复制代码

$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'], 'UTF-8', 'GBK') : '';
结果:

// $pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';
$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'], 'UTF-8', 'GBK') : '';

热门栏目