לש"ש
לא הרצתי את הקוד.
מצאתי 2 שגיאות אבל אם יהיו עוד תכתוב את המיקום.
PHP קוד:
<?php
$dir = "styles/red/images/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if(substr($file,strrpos($file,'.')+1)=='gif'||substr($file,strrpos($file,'.')+1)=='GIF')
echo "<img src=styles/red/images/$file>";
}
closedir($dh);
}
}
?>