Così dovrebbe andare. Provalo però che io non l'ho fatto!Codice PHP:<?php
$path="c:/cartella";
$dir = opendir("$path");
if($dir){
while ($file = readdir($dir)) {
if($file != '..' && $file !='.' && $file !=''){
$array_files = array("$file");
}//fine IF
} //fine WHILE
closedir($dir);
clearstatcache();
// ordini l'array in modo NATURALE
$array_files = natsort($array_files);
echo "<ul>";
foreach ($array_files as &$value) {
echo "[*]<a href=\"$path/$value\">$value</a>";
}
echo "[/list]";
} else {
echo "
<h1>Nessun file nella directory specificata!</h1>
";
}
?>
![]()

Rispondi quotando