tony2001 Tue Aug 31 07:37:02 2004 EDT
Modified files:
/php-src/main/streams streams.c
Log:
fix bug #29723 (file_get_contents() fails with the file:// wrapper under Win32)
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.61&r2=1.62&ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.61 php-src/main/streams/streams.c:1.62
--- php-src/main/streams/streams.c:1.61 Tue Jul 13 12:34:56 2004
+++ php-src/main/streams/streams.c Tue Aug 31 07:37:02 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.61 2004/07/13 16:34:56 wez Exp $ */
+/* $Id: streams.c,v 1.62 2004/08/31 11:37:02 tony2001 Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1454,7 +1454,11 @@
}
/* 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);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php