I'm using this code to list all the files that are in a certain directory.
<?PHP
$Open = opendir ("directory");
while ($Files = readdir ($Open))
{
$Filename = $uploaddir . $Files;
if (is_file ($Filename))
{
$Size = filesize ("directory/$Files");
print ("$Files $Size<br>");
}
}
closedir ($Open);
?>
The problem is it doesn't list all the files. It will only list two of them...
If I use this
<?PHP
$Open = opendir ("directory");
while ($Files = readdir ($Open))
{
$Size = filesize ("directory/$Files");
print ("$Files $Size<br>");
}
closedir ($Open);
?>
It list all the files, the directories, and .4096 and ..4096 (I'm assuming that the last two are refresh and up one level?) Anyway, does anyone know how I can list the files in a certain directory?