$ImageDirectory = 'Images/fading/edited';
$file_array = array();
if ($handle = opendir($ImageDirectory)) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
if(preg_match('/\.png$/i',$entry) == 1)
{
$file_array[] = $ImageDirectory."/".$entry;
}
}
}
closedir($handle);
}
function printImageList($file_array)
{
shuffle($file_array);
$i = 0;
foreach($file_array as $imagepath)
{
if($i == 0)
{
print "\n";
$i = 1;
}
else
{
print "
";
}
}
}
?>
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||