From b8c51d46142e6a2e4a59f6f47e9ca3d8d05174bd Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 31 Aug 2004 11:38:59 +0000 Subject: [PATCH] MFH: fix bug #29723 (file_get_contents() fails with the file:// wrapper under Win32) --- main/streams/streams.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/streams/streams.c b/main/streams/streams.c index fc3d893e09..6390600e4a 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); } -- 2.40.0