WordPress 2.3.2中文显示问题解决方法

        最可怕的wordpress更新总算成功结束了!嘿嘿!

        为什么说可怕呢?因为模板更新有很多影响因素。像数据库、还有之前所做的一切修改,都很让人担心呀~.~万一失败岂不是两个月的博客就废了么?现在看来这担心只是杯弓蛇影罢了!

         不过还是遇到了点问题,但是在预料之中的。由于我的主机是64位的,所以对于用中文版的用户可能会有中文显示的问题。曾经在装2.3.1的时候遇到过,解决过了!现在用2.3.2了,不妨就试试2.3.1的方法吧~果然,成功了!:-)

          这是我从网上收集的办法,所以作者看到请不要责怪,我已经说明过了:

把wp-includes/gettext.php 106行开始的

$this->enable_cache = $enable_cache;// $MAGIC1 = (int)0×950412de; //bug in PHP 5.0.2
$MAGIC1 = (int) – 1794895138;
// $MAGIC2 = (int)0xde120495; //bug
$MAGIC2 = (int) – 569244523;
// 64-bit fix
$MAGIC3 = (int) 2500072158;

$this->STREAM = $Reader;
$magic = $this->readint();
if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
$this->BYTEORDER = 0;
} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
$this->BYTEORDER = 1;
} else {
$this->error = 1; // not MO file
return false;
}

替换成:

$this->enable_cache = $enable_cache;// $MAGIC1 = (int)0×950412de; //bug in PHP 5
$MAGIC1 = (int) – 1794895138;
// $MAGIC2 = (int)0xde120495; //bug
$MAGIC2 = (int) – 569244523;
$MAGIC3 = (int) 2500072158; // <- 64 BIT FIX: ADD THIS LINE!

$this->STREAM = $Reader;
$magic = $this->readint();
if ($magic == $MAGIC1 || $magic == $MAGIC3) { // <- 64 BIT FIX: CHANGE THIS LINE!
$this->BYTEORDER = 0;
} elseif ($magic == $MAGIC2) {
$this->BYTEORDER = 1;
} else {
$this->error = 1; // not MO file
return false;
}

然后上传,刷新就可以看到亲切的中文界面了,:-)

, ,
30th January 2008 0 comments Permalink

Leave a Reply

Your email address will not be published. Required fields are marked *

*

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>

Statistical data collected by Statpress SEOlution (blogcraft).