Re: [PHP] using include_path with file_exists()

2001-02-20 Thread Ben Peter
Michael, the include_path is available via ini_get("include_path"). One could split that path by ":", append the filename to each path and check with file_exists(), true. I'm not sure whether this wouldn't be more expensive than using fopen(,,1). Have to check that. Thanks for the idea, Ben Mi

Re: [PHP] using include_path with file_exists()

2001-02-20 Thread Michael Dearman
Hi Ben, I thought maybe there was something like HTTP_SERVER_VARS["INCLUDE_PATH"], but apparently not. Could you just define your own $GLOBALS["my_include_path"] = and use that with file_exists()?? Mike D. Ben Peter wrote: > > Hi all, > > is there a decent way to check whether a file is avai

[PHP] using include_path with file_exists()

2001-02-20 Thread Ben Peter
Hi all, is there a decent way to check whether a file is available on the include_path? The only soultion I have found is if ( ( $fd = fopen( 'my_file', 'r', 1 ) ) ) { fclose( $fd ); /* ok, file is there */ } That one's not really nice, at it opens the file for reading. It would be bes