Re: The proposal about checking existence of directory in PHP. "dir_exists" function
| From: | Patrick Allaert | Date: | Mon, 01 Aug 2011 11:10:41 +0000 |
| Subject: | Re: The proposal about checking existence of directory in PHP. "dir_exists" function | ||
| References: | 1 2 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-65892@lists.php.net to get a copy of this message | ||
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.
> --
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php