我在Yii项目中的SearchForm视图中存在问题。
在标签中有<?> <?>
而不是“ä,ö,ü”,但此错误仅在searchForm中,页面的其余部分工作正常。
文件正确保存在UTF-8中,Utf 8 Charset也在Main.php的Header中设置,并且DB的相同配置。
有没有人想出解决方案? 非常感谢您的支持!
答案 0 :(得分:0)
检查
Apache configuration (in httpd.conf or .htaccess)
无论是UTF8还是Windows 1252
AddDefaultCharset utf-8 PHP(在php.ini中)
default_charset = "utf-8"
mbstring.internal_encoding=utf-8
mbstring.http_output=UTF-8
mbstring.encoding_translation=On
mbstring.func_overload=6
还使用mb_detect_encoding
进行调试以检查数据被破坏的位置