环境信息:
$wp_version = '2.0.3';
$wp_db_version = 3440;
mysql5.0.22-standard
在my.cnf里面设置好default-character-set=gb2312
wp-config.php设置:define ('WPLANG', 'zh_CN');
在 wp-includes/wp-db.php里的$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);这一行下面添加: mysql_query("set names 'gb2312'") or die(mysql_error());
登陆的时候就抱错:
Warning: Invalid argument supplied for foreach() in /usr/local/wordpress/wp-includes/capabilities.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/wordpress/wp-includes/capabilities.php:19) in /usr/local/wordpress/wp-includes/pluggable-functions.php on line 325
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/wordpress/wp-includes/capabilities.php:19) in /usr/local/wordpress/wp-includes/pluggable-functions.php on line 326
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/wordpress/wp-includes/capabilities.php:19) in /usr/local/wordpress/wp-includes/pluggable-functions.php on line 288
如果把数据库改成UTF8,SET NAMES那句也改成UTF8就没问题
请问哪位老大知道为什么我数据库用GB2312就有问题啊?
wordpress 2.0.3 数据库用gb2312乱码问题
来源:
作者:
时间:2006-10-20
Tag:
点击:
最新评论共有 0 位网友发表了评论
查看所有评论
发表评论
热点关注

