Re: file_exists and array_merge_clobber

From: Date: Tue, 30 Sep 2003 18:11:50 +0000
Subject: Re: file_exists and array_merge_clobber
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-4621@lists.php.net to get a copy of this message
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. -Justin Hannus "Wez Furlong" <wez@thebrainroom.com> wrote in message news:021801c38741$b34407f0$0702a8c0@titan... > Using the include path for file_exists doesn't sound useful to me, for > similar reasons as those for not allowing to write a file in the include > path - which file are you actually writing to? What if someone puts a file > with the same name earlier in the include path and so on. > > What is probably better is some kind of generic path-searching function that > returns the full path to the first file in the include_path (or some other > path). > > --Wez. > > ----- Original Message ----- > From: "Lukas Smith" <smith@backendmedia.com> > To: <internals@lists.php.net> > Sent: Tuesday, September 30, 2003 11:32 AM > Subject: [PHP-DEV] file_exists and array_merge_clobber > > > > Hi, > > > > We have a new intern who got right to work to improve file_exists() to > > also be able to check the include_path similar to how fopen() can.

« previous php.internals (#4621) next »