Posted by .:[ ikciu ]:. on 10/06/06 07:10
Hmm Aquosus <2U_LeaveMe_Alone@hotmail.com> wrote:
> I am trying to load all the images from the Images directory. There
> are about six sub_Directories in the Images directory. Some of the
> Sub_Dir have Subs themselves.
function findIMG($dir) {
$files= scandir($dir);
foreach ($files as $item) {
if (is_dir($dir.$item) && $item != '.' && $item != '..') {
findIMG($dir.$item.'/');
}elseif (file_exists($dir.$item) && !in_array($item, array('.',
'..'))) { //here you can add extensions
$fResult[] = $dir.$item;
}
}
}
findIMG('.');
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl
2be || !2be $this => mysql_query();
Navigation:
[Reply to this message]
|