Commit 08e9ae4a authored by 734642908@qq.com's avatar 734642908@qq.com

e

parent f193e2da
...@@ -396,42 +396,7 @@ class FlushController extends BaseController ...@@ -396,42 +396,7 @@ class FlushController extends BaseController
// $cache->set('huanlenongchangzhu:giftOrder',json_encode([23434,43546]),86400); // $cache->set('huanlenongchangzhu:giftOrder',json_encode([23434,43546]),86400);
set_time_limit(0); M("game_redeem_code","",C("LEWAN_HEZI"))->query("delete FROM `game_redeem_code`");
//返回随机数
function cdkey($mylen=6){
$array="123456789";
$arrayen="abcdefghijklmnopqrstuvwxyz";
$arrayEn="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$authnum = '';
for($i=0;$i<$mylen;$i++){
// $authnum .= substr($array,mt_rand(0,8),1).substr($arrayen,mt_rand(0,25),1).substr($arrayEn,mt_rand(0,25),1);
$authnum .= $array[mt_rand(0,8)].$arrayen[mt_rand(0,25)].$arrayEn[mt_rand(0,25)];
}
return $authnum;
}
$model = M("game_redeem_code","",C("LEWAN_HEZI"));
$data = array(
'type'=>1
,'create_time'=>date('Y-m-d H:i:s')
,'game_code'=>'wowtongyouxi-weixin'
);
for($i=0;$i<100000;$i++) {
echo cdkey()."<br>";
$data['code'] = cdkey();
$insertArr[] = $data;
if (count($insertArr) > 1000) {
$model->addAll($insertArr);
$insertArr = array();
}
}
if(!empty($insertArr)) {
$model->addAll($insertArr);
}
exit;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment