欢迎访问 舍力博客(www.shuyong.net)
@session_start(); $t = time();//当前时间 $changeTime = 300;// 时间间隔,单位:秒 $mima = '202406';//初始 if(isset($_SESSION['time'])){ if(($t - $_SESSION['time']) >= $changeTime){ $_SESSION['time'] = $t;$mima = mt_rand(99999, 999999);$_SESSION['rand'] = $mima; }else{ $mima = $_SESSION['rand']; } }else{ $_SESSION['time'] = $t;$mima = mt_rand(0, 9999);$_SESSION['rand'] = $mima; } echo $mima;
留言/评论:◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。