Mega Code Archive
Directory viewer, customize how you display the file structure, easy to
";
$filename=$filelist[$count];
$file_path = "$dir_name/$filename";
$filesize = filesize($file_path);
// You can use another function to format this, but you get the idea.
if (is_file($file_path)) {
// fleBLK.gif is a small icon of a file (draw yourself one and use that or use anything you want)
echo " | ";
echo " $filename | ";
echo "$filesize bytes | ";
// I suggest you change "File" to a function returning a better description or remove it
completely (make sure you take them all out though)
echo "File | ";
}
elseif(($filename != ".") && ($filename != "..")) {
// DirBLK.gif is a small icon of a folder (draw yourself one and use that or use anything you
want)
echo " | ";
echo " $filename | ";
echo " dir | ";
// I suggest you change "Directory" to a function returning a better description or remove it
completely (make sure you take them all out though)
echo "Directory | ";
}
print "";
}
?>