You are here: Re: count files in a directory « PHP Programming Language « IT news, forums, messages
Re: count files in a directory

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация