这是客户端静态页面:test.html<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title><script type="text/javascript">
function GetXmlHttpRequest()
{
    var xmlHttp=null;
    try
    {
        xmlHttp = new XMLHttpRequest();
    }
    catch(e)
    {
        try
        {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            try
            {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(e)
            {
                xmlHttp = false;
            }
        }
    }return xmlHttp;
}
function diaoyong() { xmlHttp = GetXmlHttpRequest();
xmlHttp.open("GET", "test.php?name=shenqi", true);
    xmlHttp.onreadystatechange = function() {
if(xmlHttp.readyState == 4 && xmlHttp.status == 200)
{
    var res = xmlHttp.responseText;
    document.getElementById("response").innerHTML=res;
}
}
xmlHttp.send('');
}
</script>
</head><body>
<button onclick="diaoyong()">调用js函数执行ajax</button>
<div id ="response"></div>
</body>
</html>这是服务器端被请求页面:test.php<?php
header("content-type:text/html;charset=utf-8");
if($_GET['name']=="shenqi") {
$re = "你好啊";
echo(iconv("gb2312","utf-8",$re));
}else {
echo (iconv("gb2312","utf-8","干你鬼"));
}?>
好了,上面是全部页面了,运行结果返回内容为:你好啊 
下面我说神奇的请大家帮忙解惑的问题有两个:
1:如果在服务器端test.php中将$re = "你好啊";这句改为$re = "你好啊"+$_GET[name];返回内容为0,无论在$re后面+什么都返回0;
2:如果在客户端test.html中将xmlHttp.open("GET", "test.php?name=shenqi", true);这句改为xmlHttp.open("GET", "test.php?name=神奇", true);意思就是将参数改为中文
然后在服务器端test.php中if($_GET['name']=="shenqi")改为if($_GET['name']=="神奇")
结果总是执行else语句,也就是返回干你鬼好了这就是我初学ajax遇到的神奇迷惑人问题,求大牛帮忙指导下解惑,深表感谢!