測(cè)試代碼如下:
<?php
$url = "www.baidu.com";
$contents = file_get_contents($url);
//如果出現(xiàn)中文亂碼使用下面代碼
//$getcontent = iconv("gb2312", "utf-8",$contents);
echo $contents;
?>
錯(cuò)誤如下:Warning: file_get_contents(www.baidu.com) [function.file-get-contents]: failed to open stream: No such file or directory in /www/web/wwwqzkkcn/public_html/1.php on line 3
各位大俠幫忙看看