discuz论坛迁移乱码可能是PHP环境默认值为UTF-8

原论坛是GBK编码。

检查php,发现新环境中php版本为5.6,而原版本为5.4,由于在php5.4.0后, The default value for the encoding parameter was changed to UTF-8.也就是说,php中本身也有编码这么个东西。而在php5.4.0后,默认的编码参数被更改到了UTF-8,而在更早版本中,参数是OFF,即自适应状态。
 

既然知道原因就好解决了。直接在php.ini的[PHP]标签下修改或增加 default_charset = Off 并重启WEB环境就可以了。

参考自:https://blog.csdn.net/weixin_42345934/article/details/80512210

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this post. TrackBack URL