randimage.php
/*
+---------------------------------- -----------------------+
| By Bleakwind http://www.weaverdream.com
+------- -------------------------------------------------- +
*/
$dir = "images/";//Picture directory, note that it is displayed in order by name...
$imgwidth = 0;//Picture width, if it is 0, it is the original Size
$iforder = 1;//Sequential display or random display, 1 means sequential display, 0 means random display
$ifcircle = 0;//Whether to loop when displaying sequentially, 1 means loop play, 0 To not loop
session_start();
if($imgwidth==0){$imgwidth=="";}else{$imgwidth=="width=".$imgwidth.""; }
$handle=opendir($dir);
while ($file_name=readdir($handle)){
if(($file_name!==".")&&($file_name!== "..")){$file_list[]=$file_name; }
}
closedir($handle);
if($iforder==1){
if(isset ($_SESSION[sess_order])){
if($_SESSION[sess_order] $_SESSION[sess_order]++;
}else{
if($ifcircle == 1){
$_SESSION[sess_order]=0;
}
}
}else{
$_SESSION[sess_order]=0;
}
$i=$_SESSION[sess_order];
}else{
$num=count($file_list)-1;
$i=rand(0,$num);
}
readfile($dir.$file_list[$i]);
?>
call
http://www.bkjia.com/PHPjc/532667.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532667.htmlTechArticlerandimage.php ?php /* +---------------- --------------------------------------------------+ | By Bleakwind http://www .weaverdream.com +------------------------------------------------ ----------...