fopen is not working on my server

前端 未结 6 1991
迷失自我
迷失自我 2020-12-11 03:14

It works perfectly on localhost with Xampp, but when I try it on my server (host-ed.net), fopen can\'t open any url, it only works for files without http.

&l         


        
6条回答
  •  囚心锁ツ
    2020-12-11 03:22

    As http://php.net/manual/en/function.fopen.php states,

    If filename is of the form "scheme://...", it is assumed to be a URL and PHP will search for a protocol handler (also known as a wrapper) for that scheme. If no wrappers for that protocol are registered, PHP will emit a notice to help you track potential problems in your script and then continue as though filename specifies a regular file.

    I would therefore assume that there is no registered wrapped for url's, and php is treating that as a regular filename, which doesn't exist.

提交回复
热议问题