wordpress中文tag显示404解决办法或wp中文tag不显示

因wp编码问题,导致中文tag异常,解决办法如下:在wp-includes文件夹中,找到class-wp.php,大约在178行左右,当然可以按下面关键字搜索:$_SERVER[‘PATH_INFO’]

//后面是原代码。下一行是替换代码,替换两处

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

list( $pathinfo ) = explode( '?', $pathinfo ); $pathinfo = str_replace( '%', '%25', $pathinfo ); 

//list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] ); 
list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], "UTF-8", "GBK") );
奇客云 – 免费源码模版分享 | www.aiboom.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 本站站长QQ:188118848,官网:https://www.aiboom.com
3. 本站资源仅作为学习及测试用,商用请支持正版授权!

奇客云 » wordpress中文tag显示404解决办法或wp中文tag不显示
加入VIP