RE: [PHP-DEV] file_exists and array_merge_clobber

From: Date: Tue, 30 Sep 2003 11:05:35 +0000
Subject: RE: [PHP-DEV] file_exists and array_merge_clobber
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4612@lists.php.net to get a copy of this message
> From: Wez Furlong [mailto:wez@thebrainroom.com] > Sent: Tuesday, September 30, 2003 12:58 PM > 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. In my case I had some code that loaded a module by name and modules can have different structures. So currently I do @include(). And I just thought it would be cleaner to be able to check beforehand. Hartmut just said on IRC it might be nicer to have a path as an optional parameter. Maybe it would be ok to simply be able to pass a number of paths at once. Then I could go ini_get('include_path'). However it is probably nicer being able to pass multiple paths as separate parameters instead of one with a separator between the various paths. Regards, Lukas

« previous php.internals (#4612) next »