How to make a link to files that are outside the project?

0

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);
    
asked by Jade 28.03.2018 в 17:08
source

0 answers