解决的方法之一:
(1)在每一个网页里增加
<meta http-equiv="Content-Language" content="zh-cn">;
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">;
并在apache的/etc/httpd/conf/httpd.conf配置文件中将AddDefaultCharset ISO-8859-1 改为 AddDefaultCharset off
解决的方法之二:
直接在/etc/httpd/conf/httpd.conf配置文件中将AddDefaultCharset ISO-8859-1 改为
AddDefaultCharset GB2312
(1)在每一个网页里增加
<meta http-equiv="Content-Language" content="zh-cn">;
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">;
并在apache的/etc/httpd/conf/httpd.conf配置文件中将AddDefaultCharset ISO-8859-1 改为 AddDefaultCharset off
解决的方法之二:
直接在/etc/httpd/conf/httpd.conf配置文件中将AddDefaultCharset ISO-8859-1 改为
AddDefaultCharset GB2312
上述两种方法都可以解决apache Web服务器网页显示乱码的问题。
转载于:https://blog.51cto.com/gdzy1987/186027