Posted by Krustov on 07/23/06 14:54
<comp.lang.php>
<laredotornado@zipmail.com>
<23 Jul 2006 06:48:02 -0700>
<1153662482.561797.42310@75g2000cwc.googlegroups.com>
> Hello, Using PHP 4, is there a fucntion that counts the files in a
> given directory? You can assume there are no sub-directories within
> this directory and hence, no files within the sub-directories.
>
> Thanks for any functions or one-liners.
>
<?php
$dirname="demo";
$dh=opendir($dirname);
while ($dave=readdir($dh))
{
print "$dave <br>";
}
closedir ($dh);
?>
--
Encrypted email address
www.emailuser.co.uk/?name=KRUSTOV
Make a shorter url
www.vhit.co.uk
[Back to original message]
|