= $k && $i < 4; $i++) $size /= $k; return round($size, 2).' '.$units[$i]; } // Escape HTML entities. function h($str){ return htmlentities($str); } // -----------------------------[ Path Functions ]------------------------------------- // Used to blacklist things using array_uintersect. function apply_blacklist($item){ global $BLACKLIST; return !in_array($item, $BLACKLIST); } // Provide the real path to the file function rp($path){ return DISKPATH . $path; } // Provide the web path to the file. function wp($path){ return WEBPATH . $path; } // -----------------------------[ Listings ]------------------------------------- // Load a dir listing $listing = array_filter(scandir(rp($path)), "apply_blacklist"); $dirlisting = array(); $filelisting = array(); foreach($listing as $item){ if(is_dir(rp($path.$item))) array_push($dirlisting, $item); else array_push($filelisting, $item); } // Sort output alphabetically (asc) sort($dirlisting); sort($filelisting); ?>

Misc Files -

File Listing for

0){ ?>
Filename Mtime Size Type
Up (../)
Directory
(preview)(preview)

Sample pic.
Sample text.