Bug #12033: file_exists doesn't work properly with variables

From: Date: Wed, 11 Jul 2001 05:00:59 +0000
Subject: Bug #12033: file_exists doesn't work properly with variables
Groups: php.dev 
Request: Send a blank email to php-dev+get-59649@lists.php.net to get a copy of this message
From: ddruff@gemini1consulting.com Operating system: Win 95 PHP version: 4.0.5 PHP Bug Type: Any Bug description: file_exists doesn't work properly with variables The following won't work in Win95: $path="c:/test.bat"; if(file_exists($path)) {print "file $path exists"} This will report a file existing even though it doesn't. You might think that this is because we are using forwardslashes in windows BUT IF you then parse $path to replace the forwardslashes with backslashes (using a regular expression) it still doesn't work. BUT if you do this: $path="\"".$path."\""; (leaving $path with forward slashes) it does work properly. I suppose this is a bug? -- Edit bug report at: http://bugs.php.net/?id=12033&edit=1

« previous php.dev (#59649) next »