> From: Jon Parise [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 01, 2003 10:07 AM > On Wed, Oct 01, 2003 at 10:00:23AM +0200, Hartmut Holzgraefe wrote: > > > 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() > > If we're really going to go down this road, why not implement it in a > more generic, reusable way: > > file_exists("somefile.php", ini_get('include_path')) > > That would give us some additional mileage out of the change. > > For the record, I'm -0 on this. I'd be -1 if it wasn't so obviously > optional.
Yeah that is what I suggested yesterday. I can see two scenarios for this: 1) Check infront of an include 2) Simply check if a file exists in a list of paths For 1) it would be better to pass the path optionally with the ini separator inbetween the path list in order to be able to simply pass the result of ini_get('include_path') For 2) it would probably be each to be able to pass each path separately or as an array. Obviously you can do both in one function, dunno if that is really clean either. But either way it _must_ be optional of course. Regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php