Hi, i have this code that read's files from a dir, it works fine, but how can i have it exclude certain file types?? e.g. .htaccess files or .png files??
any ideas??
Regards,
Martin
Gaming Help And Info:
Code:
$Open = opendir ("work/".$usr);
while ($Files = readdir ($Open)) {
$Filename = "work/".$usr ."/" . $Files;
if (is_file ($Filename)) {
$Size = filesize ("work/".$usr."/$Files");
$SizeFormatted = round($Size/1024,0);
$total += $SizeFormatted;
echo "<li>$Files ($SizeFormatted KB)</li><br>";
}//end if
Regards,
Martin
Gaming Help And Info: