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") );

 

联盟模板库,您的建站源码之家
联盟模板库 » wordpress中文tag显示404解决办法或wp中文tag不显示

联盟模板库,您的建站源码之家

立即查看 了解详情