wetwillabee
Veteran XV
I want a simple directory list accessible online. I found a php script, but I want the files to be displayed in numerical/alphabetical order. Someone smarter than me please modify this script to do what I want.
Code:
<?php
$path = ".";
$dh = opendir($path);
$i=1;
while (($file = readdir($dh)) !== false) {
if($file != "." && $file != ".." && $file != "index.php" && $file != ".htaccess" && $file != "error_log" && $file != "cgi-bin" && $file != ".ftpquota") {
echo "<a href='$path/$file'>$file</a><br /><br />";
$i++;
}
}
closedir($dh);
?>