日志 · 2014年9月23日

WeCenter安装后乱码解决方法

我的服务器是:
os:Centos6.5
php:5.3

新版本的wecenter应该是在php5.4下面开发的,因为5.4会默认发送“Content-Type: text/html; charset=utf-8″,而5.3没有,所以到了5.3里面编码会被识别为gbk编码。

解决方法:
在init.php最下面加一句
header(“content-Type: text/html; charset=Utf-8”);