WordPress tags标签云支持中文汉字的修改方法

这个操作是所有中文博客WordPress 模板必须的一步,原因是你用的那个 tags插件是老外编的,呵呵他们自然不需要支持中文。 修改如下:FTP后台进入 找到 wp-includes\classes.php 找到第44行代码 修改前 修改如下

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 = mb_convert_encoding($_SERVER['PATH_INFO'], “UTF-8″, “GBK”); else $pathinfo = ”; $pathinfo_array = explode(‘?’, $pathinfo); $pathinfo = str_replace(“%”, “%25″, $pathinfo_array[0]); $req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'], “UTF-8″, “GBK”);

OK了,现在标签云正常了

版权所有© HzlzH | 本文采用 BY-NC-SA 进行授权
转载需注明 转自: 《WordPress tags标签云支持中文汉字的修改方法

随机文章

{ Leave a Reply ? }

  1. 哦了 China Internet Explorer Windows

    :-? :) 试试 沙发

  2. 假睫毛 China Internet Explorer Windows

    我自己的根本就找不到这个文件

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :arrow: :?: :-| :-x :-o :-P :-D :-? :) :( :!: 8-O 8)