PHP: file_get_contents failed to open stream: Connection refused

心已入冬 提交于 2019-12-02 02:17:46

Sounds like the 2nd server is rejecting the file, try using curl to obtain the file instead; the benefit of using curl is that it'll give you helpful debugging information in the event of a failure like this. get_file_content() masks a lot of this helpful information.

Your connection to the resource is being rejected. Ensure that you can access the resource from the server (Using Lynx for instance).

I believe this is because you need a resource - fopen(), instead of a string - file_get_contents()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!