找到apache配置文件 httpd.conf ,找到以下内容

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

 

  • 实践效果:windows下的配置文件没有这些内容,手动添加也没有效果 
  • 温馨提示:尽可能使用  脚本(如:PHP)来定义编码,代码如下:
<?php
header("Content-type: text/html; charset=utf-8");
?>

 

相关文章:

  • 2021-09-11
  • 2022-02-08
  • 2021-10-03
  • 2021-11-28
  • 2021-07-04
  • 2021-12-22
  • 2021-07-28
  • 2021-06-09
猜你喜欢
  • 2021-11-16
  • 2021-07-24
  • 2022-12-23
  • 2022-02-07
  • 2021-11-09
  • 2022-03-06
  • 2021-04-26
相关资源
相似解决方案