自动生成用户名.php 0) {//字节长度,随机1-6名$long = rand(1,6);$name = array();for ($i=0; $i $long; $i++) {$item = array_rand($dictionary);if(!in_array($item,$name)){$name[] = $item;}}$name = implode(" ", $name);$country_code
0) {
//字节长度,随机1-6名
$long = rand(1,6);
$name = array();
for ($i=0; $i < $long; $i++) {
$item = array_rand($dictionary);
if(!in_array($item,$name)){
$name[] = $item;
}
}
$name = implode(" ", $name);
$country_code = explode("|",array_rand($country));
$name .= $country_code[0];
$cond['company_name'] = $name;
$res = $model_company_list_typec->getOneCompanyListTypeC($cond);
if(empty($res)){
$data = array();
$data['company_name'] = $name;
$data['country_code'] = $country_code[1];
$data['send_type'] = 2;
$data['company_type'] = 1;
//保存名称
$re = $model_company_list_typec->addCompanyListTypeC($data);
if($re){
//循环出口
$create_num = $create_num - 1;
}
}
}
showMessage("succ");exit;
}
}
?>
