PHP ini file_get_contents external url

后端 未结 7 1781
攒了一身酷
攒了一身酷 2020-11-22 15:28

I use following PHP function:

file_get_contents(\'http://example.com\');

Whenever I do this on a certain server, the result is empty. When I do

7条回答
  •  名媛妹妹
    2020-11-22 15:46

    Add:

    allow_url_fopen=1
    

    in your php.ini file. If you are using shared hosting, create one first.

提交回复
热议问题