May 102006
 

mysql数据库使用mysql4,数据库建立使用utf8_general_ci 。

修改wp-includes/wp-db.php,找到如下行:

                $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);

在后面加入一行:

                $this->query(“SET NAMES ‘utf8′”);

ok,we got it!

  One Response to “解决utf-8乱码问题”

  1. this is a test

 Leave a Reply

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>