ops....
comunque ci sono dei metodi alternativi negli script di esempio sulla stessa pagina del manuale che ti ho linkato prima.
ad esempio puoi usare opendir():
Codice PHP:<?php
$dir = "/tmp/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
}
closedir($dh);
}
}
?>

Rispondi quotando