Re: file_exists and array_merge_clobber

From: Date: Wed, 01 Oct 2003 08:00:23 +0000
Subject: Re: file_exists and array_merge_clobber
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-4629@lists.php.net to get a copy of this message
Justin Hannus wrote:
I agree with Wez, what if you are searching for a file with a relative file path, e.g: <?php if (file_exists("somefile.php")) // ... would return true if "somefile.php" is not in the current directory but is in your include path, not what you expected. Besides, you can easily implement this functionality in php.
its going to be optional, not mandatory ... but that has already been answered the whole point about this additional feature is that you can use it to check for include file existance before the actual include: if (file_exists("somefile.php", true)) { include "somefile.php"; } IMHO this case is common enough so that it deserves a native C implementation either as an option to file_exists() or as a seperate function like file_exists_in_path() -- Hartmut Holzgraefe <hartmut@php.net>

« previous php.internals (#4629) next »