function sxpm(trid,kwname,sitename)
{
  $("#"+trid).load("sxpm.php",{"trid":trid,"kwname":kwname,"sitename":sitename});
}这个是显示页面(a.php)请求的ajax,在sxpm.php页面中的如下正则匹配不到数据:$kwname = $_POST['kwname'];
$sitename = $_POST['sitename'];
$trid = $_POST['trid'];$file = 'http://www.baidu.com/s?wd='.$kwname;
$fst = file_get_contents($file);
$regleft = '/<font size="-1" color="#008000" style="margin-left:5px;">(.*)<\/font>|<font size=-1 color="#008000">(.*)<\/font>/isU';
$regright = '/<font size="-1" color="#008000">(.*)<\/font>/isU';
preg_match_all($regleft,$fst,$leftarr);
preg_match_all($regright,$fst,$rightarr);而这段代码原原本本一个字没改的出现在a.php中就可以匹配到数据,觉得应该是编码问题,我返回 $file 里面的值给 a.php 页面,显示正常的地址,但是返回 $fst 给a.php页面就出现乱码,请各位帮帮忙,看看这个怎么搞,头晕中....注:a.php页面用以显示数千个关键词在百度搜索结果中的竞价排名,包括左侧跟右侧的排名,每个关键词的排名后面都有刷新按钮,ajax请求当前关键词的最新排名,请求处理页面是 sxpm.php ,各位帮忙,急~~~~!