Hi,
Afaik not having a flag to also check the include path has not been
added, since that part of PHP is not supposed to be messing with ini
settings. However that doesnt negate that something like this is very
much in need for anyone developing applications that load code on
demand. For example in PEAR:MDB[2] I load extended functionality
ondemand. Some goes for PEAR::DB_DataObject. With the new __autoload()
we are even engouraging this more (yes obviously its not going to help
you alot if in autoload you discover that the file you want to include
is missing, as you are going to have a fatal error eitherway. However
that way you could point more clearily to the issue and also it may be
that there are several locations where the source could be located).
Obviously you can hack around this and essentially all of the above
examples are likely to do just that (note that using fopen()
to hack
around this is not a good idea, but this shows that having a flag for
the include path is not that far fetched).
regards,
Lukas
Afaik not having a flag to also check the include path has not been added,
since that part of PHP is not supposed to be messing with ini settings.
Rather than mangle file_exists()
with another option, how about something
more task specific like an equivalent to which
?
-Sara