首页 > 学院 > 开发设计 > 正文

网友军团

2019-11-06 07:17:50
字体:
来源:转载
供稿:网友
//自动生成码的函数function getRandomString() { $status=0; if($status==1){ for($m=0;$m<=19999;$m++){ $len=5; $chars = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"; mt_srand(10000000*(double)microtime()); for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < $len; $i++){ $str .= $chars[mt_rand(0, $lc)]; } //echo $str; $sql="INSERT wx_bounds_code(code_code) VALUES ('$str')"; $this->db->query($sql); } echo "执行成功!"; }else{ echo "未获得执行权限!"; } }

// 著作权归:网友军团


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表