From: Antony Dovgal Date: Tue, 31 Aug 2004 11:37:02 +0000 (+0000) Subject: fix bug #29723 (file_get_contents() fails with the file:// wrapper under Win32) X-Git-Tag: PRE_ZEND_VM_DISPATCH_PATCH~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd6d9cbeacfac20a367b6579aa81123c08b1a6fa;p=php fix bug #29723 (file_get_contents() fails with the file:// wrapper under Win32) --- diff --git a/main/streams/streams.c b/main/streams/streams.c index fc3d893e09..a7c65dde57 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1454,7 +1454,11 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char } /* TODO: curl based streams probably support file:// properly */ if (!protocol || !strncasecmp(protocol, "file", n)) { +#ifdef PHP_WIN32 + if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+4] != ':') { +#else if (protocol && path[n+1] == '/' && path[n+2] == '/' && path[n+3] != '/') { +#endif if (options & REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "remote host file access not supported, %s", path); }