RSS
热门关键字:

wordpress 2.0.3 数据库用gb2312乱码问题

来源: 作者: 时间:2006-10-20 Tag: 点击:
环境信息:
$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就有问题啊?

最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册