I'm using the code below to read files:
Locally it works, but when I put the $ dir variable with a network path, as below, I get error:
$dir = "W:/_Infraestrutura/Controles/Inventario de Equipamentos/ " ;
$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>";
}
}
Warning: opendir (W: / _ Infrastructure / Controls / Inventory Equipment /, W: / _ Infrastructure / Controls / Inventory of / /: In C: \ wamp \ www \ terms \ index.php on line 26
Warning: opendir (W: / _ Infrastructure / Controls / Inventory Equipment /): failed to open dir: No such file or directory in C: \ wamp \ www \ terms
Warning: readdir () expects parameter 1 to be resource, boolean given in C: \ wamp \ www \ terms \ index.php on line 31 \ index.php on line 26