当前位置: 首页 > 资料仓库 > 正文

修改wp-includes/class-wp.php文件。

搜索:

if ( isset($_SERVER[‘PATH_INFO’]) )
$pathinfo = $_SERVER[‘PATH_INFO’];
else
$pathinfo = ”;
$pathinfo_array = explode(‘?’, $pathinfo);
$pathinfo = str_replace(“%”, “%25″, $pathinfo_array[0]);
$req_uri = $_SERVER[‘REQUEST_URI’]

 

替换为:

if ( isset($_SERVER[‘PATH_INFO’]) )
$pathinfo = iconv(‘GBK’, ‘UTF-8’, $_SERVER[‘PATH_INFO’]);
else
$pathinfo = ”;
$pathinfo_array = explode(‘?’, $pathinfo);
$pathinfo = str_replace(“%”, “%25”, $pathinfo_array[0]);
$req_uri = iconv(‘GBK’, ‘UTF-8’, $_SERVER[‘REQUEST_URI’]);

[分享]WordPress 3.1 中文链接修复:等您坐沙发呢!

发表评论