prova rinominando i file in questo modo
141_001.jpg
141_010.jpg
inserendo tutti gli zeri che pensi siano necessari... dovrebbe funzionare
Se usi readdir() usa la sintassi che trovi nel primo esempio del manuale: riporto qui sotto
Codice PHP:<?php
// Note that !== did not exist until 4.0.0-RC2
if ($handle = opendir('/path/to/files')) {
echo "Directory handle: $handle\n";
echo "Files:\n";
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
/* This is the WRONG way to loop over the directory. */
while ($file = readdir($handle)) {
echo "$file\n";
}
closedir($handle);
}
?>

Rispondi quotando