我在linux的服务器上写的php程序,$path="www.sohu.com";
$str=file_get_contents($path);每次打开相应页面的时候,都会提示:
file_get_contents(http://www.sohu.com) [function.file-get-contents]: failed to open stream: No route to host in /home/www/111/test.php on line 4
不知道是什么意思?请高手帮忙解释下
$str=file_get_contents($path);每次打开相应页面的时候,都会提示:
file_get_contents(http://www.sohu.com) [function.file-get-contents]: failed to open stream: No route to host in /home/www/111/test.php on line 4
不知道是什么意思?请高手帮忙解释下
allow_url_fopen = On但由于协议头的原因,并不能保证都能打开远程文件
谢谢ls的,我试试
allow_url_fopen = On
还是不行啊
你最好设置file_get_contents这个函数的第三个参数