Php 获取错误文件\u获取\u内容(http://www.somewebsite.com)[function.file get contents]:无法打开流

Php 获取错误文件\u获取\u内容(http://www.somewebsite.com)[function.file get contents]:无法打开流,php,file,error-handling,web-scraping,file-get-contents,Php,File,Error Handling,Web Scraping,File Get Contents,我正试图抓取这个网站的一些数据,它在我的本地主机上工作,但当我上传到服务器上时,它给了我这个错误 Warning: file_get_contents(http://www.somewebsite.com/page) [function.file-get-contents]: failed to open stream: Permission denied 我在我的主机上发现allow_url_fopen设置已打开。我不知道网页的扩展名。文件获取内容不是从外部源获取数据的好方法。考虑使用。您可

我正试图抓取这个网站的一些数据,它在我的本地主机上工作,但当我上传到服务器上时,它给了我这个错误

Warning: file_get_contents(http://www.somewebsite.com/page) [function.file-get-contents]: failed to open stream: Permission denied

我在我的主机上发现allow_url_fopen设置已打开。我不知道网页的扩展名。

文件获取内容
不是从外部源获取数据的好方法。考虑使用。您可以更好地控制请求。好的,但是我现在需要完成这项工作,我已经为我的客户上传了网站,现在无法更改。请检查您是否能够从运行PHP脚本的服务器/计算机连接到。请检查您的PHP设置
PHP-I|grep allow\u url\u fopen中的值