loganalyzer中文日志乱码的解决办法

wKiom1NGOVjC0BxaAAC4iSBOJxA864.jpg

编辑源码包下include/functions_common.php文件;

找到含有return htmlentities字段的行;

return htmlentities($myStr, ENT_NOQUOTES, $content['HeaderDefaultEncoding']);// "UTF-8");

修改为:

return htmlentities($myStr, ENT_NOQUOTES, $content['HeaderDefaultEncoding']), "UTF-8");

如下所示:

wKioL1NGOWSAegv9AAC0wl2GVfE725.jpg

重启httpd或者nginx;确保数据库字符集为UTF8

Nginx  php重启命令:

kill-USR2 `cat /opt/soft/php/var/run/php-fpm.pid`

然后再修改Admin Center中的Default character encoding参数为UTF-8

wKiom1NGOsOBbrnqAALTQWvDThg427.jpgl

显示正常如下:

wKiom1NLm-ax6K53AAb9sWJM1Mc761.jpg



你可能感兴趣的:(乱码,loganalyzer,日志集中管理)