当前位置: 代码迷 >> PHP >> windows2003下的乱码怎么解决
  详细解决方案

windows2003下的乱码怎么解决

热度:111   发布时间:2012-03-04 11:13:34.0
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 ");
  相关解决方案