|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-11 01:00 UTC] ddruff at gemini1consulting dot com
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?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
I cannot reproduce this under Windows 2000 with PHP 4.0.6 Do you get the same error if you use a literal value instead of a variable. ie. var_dump (file_exists ("c:/some_random_file_name")); or var_dump (file_exists ("c:\\some_random_file_name"));