将$rg[1]=mb_ereg_replace("谷歌","百度",$rg[1]); 这句替换为$rg[1]=mb_ereg_replace("百度","谷歌",iconv('gb2312', 'utf-8',$rg[1]));