按照官网上的标准
<?php
$homepage = file_get_contents('http://www.baidu.com/');
echo $homepage;
?>
为啥echo 不出来东西了,提示Warning: file_get_contents(http://www.baidu.com/) [function.file-get-contents]: failed to open stream: Connection timed out in
<?php
$homepage = file_get_contents('http://www.baidu.com/');
echo $homepage;
?>
为啥echo 不出来东西了,提示Warning: file_get_contents(http://www.baidu.com/) [function.file-get-contents]: failed to open stream: Connection timed out in
还有个就是baidu.com做了手脚..
下面的可以参考
http://zhidao.baidu.com/question/94794127.html