file_get_contents not working?

后端 未结 6 1197
遥遥无期
遥遥无期 2020-11-28 13:25

This code is not working to server. But It is working to my localhost (xampp)

$url = file_get_contents(\'http://www.site.com/\');
$xhtml=\'|

        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 14:05

    I know this topic is old, but I had to figure this out on my own and figure it will help someone later.

    Like the above says:

    You need:

    allow url fopen allow url include

    If you are using CURL then you need curl extension

    If you are file_get_contents of a https:// I believe you also need apache ssl module, as well as openssl php extension.

    Without OpenSSL and SSL Module doing a file_get_contents on a facebook graph (obviously https://) it returned "No file found" error.

提交回复
热议问题