Re: The proposal about checking existence of directory in PHP. "dir_exists" function

From: Date: Mon, 01 Aug 2011 12:24:18 +0000
Subject: Re: The proposal about checking existence of directory in PHP. "dir_exists" function
References: 1 2 3  Groups: php.qa 
Request: Send a blank email to php-qa+get-65893@lists.php.net to get a copy of this message
On 1 August 2011 12:10, Patrick Allaert <patrick.allaert@gmail.com> wrote: > 2011/8/1 Richard Quadling <rquadling@gmail.com>: >> On 1 August 2011 01:12, Valeh Hajiyev <valeh.hajiyev@gmail.com> wrote: >>> Hi, PHP developers. I have a proposal for PHP. The proposal is about >>> checking existence of directory in PHP. >>> I noticed that it's hard to write function or any if control for >>> checking existence of directory for beginner php programmers. So I >>> suggest to use "dir_exists" function for this in next updates of PHP. >>> Best regards, Valeh Hajiyev. >> >> Whilst the name may be misunderstood, file_exists() does the trick just fine. >> >> "Checks whether a file or directory exists >> >> http://uk2.php.net/manual/en/function.file-exists.php > > What about is_dir()? > Returns TRUE if the filename exists and is a directory, FALSE otherwise. Those poor, naked, little felines. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

« previous php.qa (#65893) next »