Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12223 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27936 invoked by uid 1010); 18 Aug 2004 19:26:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27645 invoked by uid 1007); 18 Aug 2004 19:26:24 -0000 To: internals@lists.php.net Date: Wed, 18 Aug 2004 21:26:37 +0200 Message-ID: <20040818212637.775a7418.bjori@jeshus.com> Organization: Jeshus X-Newsreader: Sylpheed version 0.9.12-gtk2-20040622 (GTK+ 2.4.7; i386-portbld-freebsd5.2.1) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Posted-By: 62.249.187.54 Subject: Checking if file is on localhost or not, implent optional argument to file_exists() ? From: bjori@jeshus.com (Hannes Magnusson) Since PHP5 many/most filesystem functions can be used with "some" URL wrap= pers. That's good and all *but* now it's quite difficult to check if file is on l= ocalhost or not. It=B4s possible to use parse_url() and check if "scheme" is set for instan= ce but I belive we should insert new optional argument to file_exists(), is= _file() and is_dir() etc. example; bool file_exists ( string filename [, bool strict ] ) where strict is defau= lt to false but when true only check if filename exists on localhost. Agree? Or is there a simpler/better way of doing this? - Hannes