Edong的MySQL是4.1x版本的,而大多数的都是4.0.x,所以在转移数据的时候,有可能会遇到很多问题,或者潜在的问题。
导入到4.1x的新的数据库中,在页面上显示为乱码(许多问号),这个应该还好解决。(from 阿修的部落格)
為著解決這個問題必須去修改wp-includes/wp-db.php內的資料連線設定。詳細的修改方式是這樣的:
$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);
//加上下面這行
$this->query("SET NAMES 'utf8'");
其实即使没有乱码也未必是一件好事,因为MySQL 4.1x存在一个collation (校勘)的问题,默认编码并不是UTF-8,而是latin1_swedish_ci。(MySQL是瑞典人的产品)
如果我们的编码是UTF-8的,则选择collation (校勘)为utf8_general_ci。
做法是:在导出的sql语句中,CREAT TABLE ‘wp_xx’(……)后面加上CHARSET=utf8!然后再导入到MySQL 4.1.x中。这叫以绝后患。
(感谢伟大的Windix同学全程指导)
> Michael Says:
Warning: Undefined variable $comment in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
Warning: Attempt to read property "comment_approved" on null in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
21 11 月, 2006 at 下午10:56
$this->query(“SET NAMES ‘utf8′”);
这一行每次升级wordpress版本都得手动加上去吧?那岂不是很麻烦?
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
> 解决使用 MySQL 命令不能添加中文内容 | 巧克力工厂 (Beta3) Says:
Warning: Undefined variable $comment in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
Warning: Attempt to read property "comment_approved" on null in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
22 11 月, 2006 at 上午12:24
[…] 接着打开我的 blog 后发现,所有的帖子内容都是 ?, 想起以前看到过的解决方案,于是打开 wp-include 目录把文件 wp-db.php 里 […]
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
> Richie Says:
Warning: Undefined variable $comment in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
Warning: Attempt to read property "comment_approved" on null in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
10 1 月, 2007 at 下午6:07
升级的时候也需要,这次升级又搞得都是问号了,于是又翻出了你这篇文章,嘿嘿~
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
> dasfsgf Says:
Warning: Undefined variable $comment in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
Warning: Attempt to read property "comment_approved" on null in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
14 1 月, 2007 at 下午11:00
為什麼我照做了還是不行????????
怎麼搞的啊????救救我啊
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
> woyaokan Says:
Warning: Undefined variable $comment in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
Warning: Attempt to read property "comment_approved" on null in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 29
22 1 月, 2007 at 上午2:43
测试你的PHP能力
http://www.zymose.com/kaoshi/kaoti.php
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 252
Warning: Attempt to read property "user_level" on bool in /www/wwwroot/wordpress/wp-includes/deprecated.php on line 253
Warning: Undefined variable $oddcomment in /www/wwwroot/wordpress/wp-content/themes/OtherSide/comments.php on line 86