开发者

Getting strange error in PHP script running on unix

开发者 https://www.devze.com 2023-03-14 07:40 出处:网络
I\'m running a php in a unix shell and I\'m getting the following error. The script is a web scraper and it work fine on my host if I access it. But I want to run it as a cron job, What shoul I do?

I'm running a php in a unix shell and I'm getting the following error. The script is a web scraper and it work fine on my host if I access it. But I want to run it as a cron job, What shoul I do?

Warning: file_get_contents(http://www.lomamatkat.fi/iframes/last-minute-offers/?lastminute_next=50): failed to open stream: no suitable wrapper could be found in /var/www/customers/lentovertailufi/public_html/matkat/script/lomamatkat.php on line 30 PHP Warning: file_get_contents(): URL file-access 开发者_StackOverflow社区is disabled in the server configuration in /var/www/customers/lentovertailufi/public_html/matkat/script/lomamatkat.php on line 30


Update your php.ini file, and set the 'allow_url_fopen' option to 'On'.


If you are unable to change allow_url_fopen consider using use curl (if must be php) or Wget


go to the php.ini and enable that or use curl or one of the other http get functions. file_get_contents is considered a dangerous system call for urls because people can slip files into it as well.

0

精彩评论

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

关注公众号