Copyright (C) 2002 Richard Clark (rclark@exorsus.net) See the GNU General Public License included with this software for more details. If none is included you have NO LICENSE to operate this software and should contact the author immediately. */ function format_size($size) { if ($size<1024) { return $size."b"; } if ($size<(1024*1024)) { return sprintf("%dk",$size/1024); } return sprintf("%.1fM",$size/(1024*1024)); } function get_dir_listing() { $listing = array(); $dh = opendir(getcwd()); while ($file = readdir($dh)) { array_push($listing, $file); } closedir($dh); sort($listing); return $listing; } ?> Listing of <?=dirname($PHP_SELF)?>
%-60.60s    %s %6.6s\n",$file,"$name/",$time,"-");
		else
			printf("%-60.60s    %s %6.6s\n", $name,$file,$time,format_size(filesize($file)));
	}
?>