Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25997 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55610 invoked by uid 1010); 8 Oct 2006 17:33:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55595 invoked from network); 8 Oct 2006 17:33:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Oct 2006 17:33:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=pollita@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pollita@php.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 216.145.54.172 cause and error) X-PHP-List-Original-Sender: pollita@php.net X-Host-Fingerprint: 216.145.54.172 mrout2.yahoo.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [216.145.54.172] ([216.145.54.172:23243] helo=mrout2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/1E-53364-E5639254 for ; Sun, 08 Oct 2006 13:33:19 -0400 Received: from [127.0.0.1] (proxy8.corp.yahoo.com [216.145.48.13]) by mrout2.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id k98HX6JI050520; Sun, 8 Oct 2006 10:33:07 -0700 (PDT) Message-ID: <45293676.1060902@php.net> Date: Sun, 08 Oct 2006 10:33:42 -0700 User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Ralph Schindler , internals References: <4526D167.1080309@smashlabs.com> <45274D24.7040206@php.net> In-Reply-To: <45274D24.7040206@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: is_readable and include path From: pollita@php.net (Sara Golemon) >> bool is_readable ( string filename [, bool use_include_path] ) > > we can always dream .. > so far the answer has been that this parameter should never have been > added to fopen(), and that file_exists(), is_readable and friends should > never get this feature. IIRC the reason was that they should not be > reading the include path, however even proposing to be atleast able to > pass in an order list of search pathes has been shot down. nevermind the > common use case for such a feature. > How 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