= 7) { if ($dsize / 1048576 < 100) { $dsize = number_format($dsize / 1048576, 1); } else { $dsize = number_format($dsize / 1048576, 0); } return $dsize . "M"; } elseif (strlen($dsize) >= 10) { $dsize = number_format($dsize / 1073741824, 3); return $dsize . "G"; } else { $dsize = number_format($dsize / 1024, 0); return $dsize . "K"; } } # presentation echo '

'; echo "Index of " . basename(getcwd()); echo "

\n"; $totalsize = 0; $odd = FALSE; ?> ' : ''; echo "\n"; echo ''; echo "\n"; $odd = !$odd; $totalsize += $size; } ?>
'; echo '' . $file . ''; echo ''; echo format_filesize($size) . '
'; echo '
' . "Total: " . format_filesize($totalsize) . "\n"; ?>