dir()
| From: | Comron E Sattari | Date: | Thu, 06 Jul 2000 07:30:52 +0000 |
| Subject: | dir() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5178@lists.php.net to get a copy of this message | ||
hey,
I'm trying to use dir() to get a listing of subdirectories... but i am
failing.
here is the code, but it is only echo'ing files, no directories...
$i = 0;
$d = dir("./image.db");
while($entry=$d->read())
{
echo $entry . "<BR>";
if ( is_dir($entry) )
$array[$i++] = $entry; }
}
$d->close();
/*echo count($array); debug*/
for($i = 0; $i < count($array); $i++)
{
echo $array[$i];
}
thanks,
comron