用file_get_contents返回的数据是乱码 上网找到了问题,成功解决、 而上面那种全部乱码的,就是因为数据被gzip压缩编码过的。解决方法 $data = file_get_contents($url); 使用 iconv("gb2312", "utf-8//IGNORE",$data); 或者 iconv("GBK","UTF-8",$data);