Using this code only specified <dir> can be explored...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<?php
$min = date("i");
$hour = date("G");
$mon = date("m");
$mday = date("d");
$mday_nice = date("j");
$year = date("y");
$month = date("n");
$wday = date("w");
$archive_file = "$year$mon$mday";
$archive_dir_a = array();
chdir("files/archive");
$dir=opendir('.');
while ($file = readdir($dir)) {
array_push($archive_dir_a,$file);
}
closedir($dir);
// assure the files are in numerical order
sort($archive_dir_a);
chdir("../../");
// pop off the listings for directories
array_shift($archive_dir_a);
array_shift($archive_dir_a);
// remove the .txt extension and get index.html or any "goofs" out of the list
$archive_list = array();
foreach ($archive_dir_a as $value) {
if($value != "index.html" && $value != ".txt"){
array_push($archive_list,$value);
}
}
// list the files in reverse order for the drop-down box so current file is listed first
$archive_list = array_reverse($archive_list);
$archive_num = count($archive_list);
array_push($archive_list,$archive_file);
$archive_count = 0;
while ($archive_count < $archive_num) {
$size = filesize ("files/archive/$archive_list[$archive_count]")/1024;
$size_new = substr ($size,0,4);
echo "<a href=\"files/archive/$archive_list[$archive_count]\">$archive_list[$archive_count]</a>";
echo "<br>";
$archive_count++;
}
?>