我的 utf-8 有问题,我试图在我的页面上显示俄语字符,但我得到了????而不是那些俄罗斯字符。
我尝试像 AddDefaultCharset UTF-8 一样修改 .htaccess 但没有奏效。
我还观察到,当我尝试使用 .html 扩展名(无 php)显示字符时,它工作正常,但使用 php 文件显示 ?????。
服务器详情
php 5.3.16
centos 6.3 版
我和这里有类似的问题
http://remository.com/forum/func,view/id,18483/catid,24/
谢谢
最佳答案
在主 php.ini 中添加这些行对我有用
default_charset = "utf-8"
mbstring.internal_encoding=utf-8
mbstring.http_output=UTF-8
mbstring.encoding_translation=On
mbstring.func_overload=6
关于php - UTF-8 字符集 CentOS PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13104615/