I am trying to get the number of files in a directory.
I have the following code
[php]
if ($handle = opendir(’…/uploads/0000004/’)) {
while (false !== ($file = readdir($handle))) {
if ($file != “.” && $file != “…”) {
$files = array($file);
echo “$file
n”;
}
}
closedir($handle);
}
echo count($files);
[/php]
but its just returning 1
anyone have any suggestions