Greg Beaver wrote:
In keeping with other functions that test pseudo-types like
is_callable(), why not create a new function is_includeable() that will
take a filename/path, and use include_path by default, or accept an
optional array of paths to search.
if (is_includeable("somefile.php")) {
In keeping with other functions that test pseudo-types like
is_callable(), why not create a new function is_includeable() that will
take a filename/path, and use include_path by default, or accept an
optional array of paths to search.
if (is_includeable("somefile.php")) {
include "somefile
> 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
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 thi
Justin Hannus wrote:
I agree with Wez, what if you are searching for a file with a relative file
path, e.g:
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
Aahh, I didn't see that in your original message :)
"Lukas Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > From: Justin Hannus [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 30, 2003 8:12 PM
> >
> > I agree with Wez, what if you are searching for a file with a relat
> From: Justin Hannus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2003 8:12 PM
>
> I agree with Wez, what if you are searching for a file with a relative
> file
> path, e.g:
>
> if (file_exists("somefile.php"))
> // ...
>
> would return true if "somefile.php" is not in the current
I agree with Wez, what if you are searching for a file with a relative file
path, e.g:
wrote in message
news:[EMAIL PROTECTED]
> 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 ar
> From: Wez Furlong [mailto:[EMAIL PROTECTED]
> 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
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 bet
10 matches
Mail list logo