$path="d:/"; //Specify the path of your cd. PHP must have access on your drive for cd. It is working on me using Windows 2000 with php5 installed.
function showfiles($path)
{
if (substr($path,-1) <> "/")
$path=$path."/";
$file=scandir($path);
while (list($key, $val) = each($file))
{
if (filetype($path.$val)=="dir" && $val<>".." && $val<>".")
{
$count++;
print "".$count.". ".$path.$val."\n";
showfiles($path.$val);
}
elseif (filetype($path.$val)=="file")
{
$mp3=explode(".",$val);
if (in_array("mp3",$mp3)||in_array("MP3",$mp3))
{
$count1++;
print "".$count1.". ".$val."\n";
}
}
}
}
?>
Recursive MP3 List