How can I load a remote file using file_get_contents()?

后端 未结 2 1396
孤独总比滥情好
孤独总比滥情好 2021-01-20 04:06

Scratching my head a bit now with this.
I am trying to get a file from a remote url. I can save contents from local files, but can\'t from remote.

This works:

2条回答
  •  情话喂你
    2021-01-20 04:38

    Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/sites/mydomain/myfile.php on line 5`

    This would suggest you are either using an incorrect url, or DNS is not correctly set up on your server.

提交回复
热议问题