刚学jquery,试了一个例子,有两个页面index.html,data.php,但每次执行都显示的都是乱码,请问该怎么办?

index.html
data.php
if($_GET['what']=='good')
{
$names=array('Sherlock Helmes','John Watson','Hercule Poirot','Jane Marple');
echo getHTML($names);
}
else if($_GET['what']=='bad')
{
$names=array('Professor Moriarty','Sebastian Moran','Charles Milverton','Von Bork','Count Sylvius');
echo getHTML($names);
}
function getHTML($names)
{
$strResult='
- ';
- '.$names[$i].' ';
for($i=0;$i
$strResult.='
}
$strResult.='
return $strResult;
}
?> 分享到:
------解决方案--------------------
没有配置php的环境