开发者

Warning while using file_get_contents

开发者 https://www.devze.com 2023-03-31 04:22 出处:网络
I used the following code. $homepage = file_get_contents(\'http://www.google.co.in/\'); echo $homepage;

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

精彩评论

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