Re: Re: is_readable and include path
| From: | Ralph Schindler | Date: | Mon, 09 Oct 2006 03:56:02 +0000 |
| Subject: | Re: Re: is_readable and include path | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25998@lists.php.net to get a copy of this message | ||
Sara Golemon wrote:
I prefer the word "mature" instead of dream ;)bool is_readable ( string filename [, bool use_include_path] )we can always dream ..
that is an interesting suggestion,.. in researching other options, how about this: string realpath ( string path [, bool use_include_path]) This makes more sense to me, plus it can be done once and wont have to worry about including this in the family of file functions. This seems like a logical place to resolve paths., including file that reside in the relative include-path. Think this can fly? -ralphHow about something which will save having to resolve that path twice? $realpath = stream_resolve_include_path($relativepath); if ($realpath && is_readable($realpath)) { $fp = fopen($realpath, 'rb', false); } else { /* File isn't readable */ } The code for doing this is all in there, it'd just need some quick exposing to userspace... -Sara