Anayet
New Member
I have this directory file listing script i use which somebody wrote for me some time ago:
What i want to know is, is there some way i can have files sorted automatically by name? And also, is there a way i can have them be sorted by date modified? I use the script in different directories which is why i'm wanting two different methods of sort.
Thanks :classic2:
PHP:
<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "style.css" && $file != "index.php" && $file != "indexer.php") {
echo "<a href='$file'>$file</a><br>";
}
}
closedir($handle);
}
?>
Thanks :classic2:

