Reply to Re: Find all files in a directory thx NM

Your name:

Reply:


Posted by Koncept on 11/02/06 21:31

In article <Q%s2h.36913$P7.24626@edtnps90>, Aquosus
<2U_LeaveMe_Alone@hotmail.com> wrote:

> Thanks
>
>

From docs ( @see readdir() )

<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "$file\n";
}
}
closedir($handle);
}
?>

You would just have to modify this like so:

<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if (is_file($file) && $file != "." && $file != "..") {
echo "$file\n";
}
}
closedir($handle);
}
?>

--
Koncept <<
"The snake that cannot shed its skin perishes. So do the spirits who are
prevented from changing their opinions; they cease to be a spirit." -Nietzsche

[Back to original 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

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