//fetch random images to use $path="/usr/www/users/splorp/tiddles.co.uk/cats/jpeg"; $html_path="cats/jpeg"; //check it's a dir if(!is_dir($path)) { die("That's no directory."); } if($handle=opendir($path)) { while (false!==($file=readdir($handle))) { if($file!="." && $file!="..") { //got filename $file_list[]=$file; } } } closedir($handle); //select 9 random ones $random_images_array=array_rand($file_list,9); for($n=0;$n<=9;$n++) { $random_image[]=$file_list[$random_images_array[$n]]; } ?>
|
|
1 - 2
- 3 -
4 - 5
- 6 - 7
- 8 - 9
- 10 |
|
|
||||||||||||||||||||||||||||||||||||
|
|
1 - 2
- 3 -
4 - 5
- 6 - 7
- 8 - 9
- 10 |
![]() |