日期:2014-05-17  浏览次数:20470 次

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

test2.php
      <?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 ");