I have this code that is almost exactly what I need, but I need to make a modification.
<?
$absolute_path = "/home/myhome/public_html/sounds";
$dl = "http://www.server.com";
$dir = opendir($absolute_path);
while ($file = readdir($dir))
{
if (($file != "..") && ($file != ".") && !strstr($file, '.php') && !strstr($file, '.html'))
{
$list .= "<a href='$dl/$file'>$file</a><br>";
}
}
echo $list;
?>
This obviously lists all the files in the sound folder. In addition I need the script to list all the files within a directory in the sound folder, preferably separated by the folder name...
If I have 2 dirs in my sound dir, one says animals, one says weapons, I would like it to be displayed:
ANIMALS
dog.wav
cat.wav
WEAPONS
gun.wav
shotgun.wav
I really appreciate all the help I've recieved so far, and this script is the finishing touch to my site....thanks in advance!