note 47758 deleted from function.is-dir by tomsommer
| From: | tomsommer@php.net | Date: | Mon, 29 Nov 2004 08:47:53 +0000 |
| Subject: | note 47758 deleted from function.is-dir by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-81141@lists.php.net to get a copy of this message | ||
Note Submitter: avaurus at gmail dot com
----
I wanted only to extract dirs of a given directory, so I used the following code:
<?php
if (is_dir($file)==true)
{
$dirs[] = $file;
}
?>
...this code does not work for me, but ...
<?php
if (is_file($file)==false)
{
$dirs[] = $file;
}
?>
..worked fine for me :).
----
Reason: bad code