Wiem, że było już kilka podobnych tematów przeczytałem je ale nie mogłem znaleźć odpowiedzi na moje pytanie na strone wgrałem taki skrypt:
<?php
/* Customise this line to change to your images folder */
$dir = 'foty/'; $dh = opendir($dir);
/* The following loop scans the directory specified ignoring folders and Thumbs.db */
while (false !== ($filename = readdir($dh))) { if($filename == "Thumbs.db" ||
is_dir($filename)){ }else{ $tempArray = explode(".", $filename);
/* Add image file types in the code below */ if($tempArray[1] == "JPG" || $tempArray[1] ==
"gif" || $tempArray[1] == "png" || $tempArray[1] == "tif" || $tempArray[1] == "bmp"){
$files[] = $filename; } } }
/* Generate a random number */ $nooffildi = count($files); $nooffiles = ($nooffildi-1);
srand((double)microtime()*1000000); $randnum = rand(0,$nooffiles);
/* print the result */echo "
HEIGHT='150'>"; ?>[/code]
Wszystko działa ale nie mogę go przerobić tak by pobierało zdjęcia z kilku folderów a nie tylko z foty. Był bym bardzo wdzięczny jeśli by ktoś był tak uprzejmy i przerobił mi ten skrypt