for ($i = 0, $j = 0; $i < $num; $i++)
{
//$cardcode = ($maxcode+ $i).str_pad(mt_rand(0, 9999), 4, '0', STR_PAD_LEFT);
while(1){
$cardcode = str_pad(mt_rand(0, 99999999), 8, '0', STR_PAD_RIGHT);
$cmcard=$this->_mcard_mod->check_mcard_num($cardcode); //判断是否重复
if($cmcard){
continue;
}else {
break;
}
}
}
生成会员卡或优惠券
最新推荐文章于 2021-06-03 14:23:53 发布