PHP file_get_contents returning false

前端 未结 4 1842
南笙
南笙 2021-01-04 00:12

Maybe I\'ve been sat here too long staring at this but WHY would file_get_contents return false here? I\'ve cut and paste the URL and it works fine

4条回答
  •  一向
    一向 (楼主)
    2021-01-04 00:42

    Sometimes if file_get_contents return false (not found) you should see if the url is encoded.

    example:

    http://test.net/демо/

    Should be:

    https://test.net/%D0%B4%D0%B5%D0%BC%D0%BE/

提交回复
热议问题