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

后端 未结 2 1391
孤独总比滥情好
孤独总比滥情好 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:21

    check the php settings...

    it may be due to security issue... "allow_url_fopen = On"

    http://www.php.net/manual/en/function.file-get-contents.php

提交回复
热议问题