找到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"); ?>