file_get_contents() error

前端 未结 2 647
孤城傲影
孤城傲影 2020-12-06 12:05

I am using file_get_contents on my PHP and it throws some errors:

My code

#try to fetch from remote
$this->remotePath = \"http://some-hostname.com         


        
2条回答
  •  我在风中等你
    2020-12-06 12:25

    Your server must have the allow_url_fopen property set to true. Being on a free webhost explains it, as it's usually disabled to prevent abuse. If you paid for your hosting, get in contact with your host so they can enable it for you.

    If changing that setting is not an option, then have a look at the cURL library.

提交回复
热议问题