file_get_contents not working?

后端 未结 6 1192
遥遥无期
遥遥无期 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条回答
  •  再見小時候
    2020-11-28 14:24

    Try this function in place of file_get_contents():

    It can be used just like file_get_contents(), but uses cURL.

    Install cURL on Ubuntu (or other unix-like operating system with aptitude):

    sudo apt-get install php5-curl
    sudo /etc/init.d/apache2 restart
    

    See also cURL

提交回复
热议问题