I want to make a list of the audio files that are in a directory outside of my project. I have this code but it only shows me the list and when I click on the link it gives me an error. Would what I want be possible?
$path= "Ruta/Carpeta";
$dir_handle = @opendir($path) or die("No se pudo abrir");
while ($file = readdir($dir_handle)) {
if ($file != "." && $file!= ".."){
$enlace=$path.'/'.$file;
echo "<a href='$enlace'>".$file."</a><br>";
}
}
closedir($dir_handle);