Home >Backend Development >PHP Tutorial > windows2003下的乱码怎么解决

windows2003下的乱码怎么解决

WBOY
WBOYOriginal
2016-06-13 13:49:261033browse

windows2003下的乱码如何解决
我在windowsXP下显示正常的页面,放在windows2003下中文却成了乱码,配置环境的差别只在于在winxp下是用模块方式加载的php,在win2003下是用的cgi方式,测试页面只有两个:
test1.php
    dsad

test2.php
      echo   urldecode($_GET[ 'testValue ']);
      ?>

请各位高手帮着看一下,另外:apache中的httpd.conf中已经加入了 "AddDefaultCharset   utf-8 "了.apache版本为2.2.3,php版本为:5.1.6

------解决方案--------------------
header( "content-type:text/html; charset=utf-8 ");
------解决方案--------------------
可以不用加,可能是你的浏览器把,没有选字符自动

或者加个header

header( "content-type:text/html; charset=utf-8 ");

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn