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") );
RIPRO主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
仿站酷子主题 » wordpress中文tag显示404解决办法或wp中文tag不显示

发表评论

提供最优质的资源集合

立即查看 了解详情