function ad($dir) { if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if ($file!="." && $file!="..") { $filelist[]=$file; } } closedir($dh); } } $number=rand(0,count($filelist)-1); $randomfile=$filelist[$number]; if (count($filelist)!=0) { include($dir."/".$randomfile); } else { ?>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||