1
Good Afternoon,
I am using the code below to open a folder over the network:
$dir = "\\\SR9\Infraestrutura\Controles\Termos\A\\" ;
$pasta = opendir($dir);
echo "<ul data-role='listview' data-inset='false' data-filter='true'>";
echo("<li data-role='list-divider'><a href='#'>A</a></li>");
while ($arquivo = readdir($pasta)){
if ($arquivo != '.' && $arquivo != '..'){
echo "<li><a href='".$dir.$arquivo."' rel='external' >".$arquivo."</a></li>";
}
}
The above code is used to list directories. It is working perfectly. However, when I click on the link, it shows a 404 error.
The requested URL /terms/ SR9 Controls Terms MYFILE.pdf was not found on this server.
How to solve?
access files through the URL: you have to have the right bar that I know about. Because there is no way to access the network through the browser. And it has to have a sort of address:
http://localhost/arquivos/seuarquivo.pdf
but if you are listing directories by browser, try this:\\\SR9/Infraestrutura/Controles/Termos/A/seu_arquivo.pdf
– Ivan Ferrer
This is from a server.
– Ivan Ferrer