by ravenhair on Wed Apr 19, 2006 5:41 pm
A php method. This only does the current directory. But if placed as index.php in each directory it will work and be dynamic.
<?php
$dir = '.';
$pattern = '/^\.*/i';
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
foreach ($files as $value) {
#preg_match($pattern, $value, $matches);
#print_r($matches);
#echo "<a href=\"$matches[0]\">$matches[0]</a><br>\n";
echo "<a href=\"$value\">$value</a><br>\n";
}
?>