开发者

Warning while using file_get_contents

I used the following code.

$homepage = file_get_contents('http://www.google.co.in/'); echo $homepage;

But it display the following warning message

Warning: file_get_contents(http://www.google.co.in/) [function.file-get-contents]: failed to open s开发者_如何学运维tream: HTTP request failed! in /home/web/cron/sample.php on line 47


  1. Check setting in php.ini allow_url_fopen
  2. Check your DNS settings.
  3. Check firewall settings
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜