$str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$code = "";
for ($i = 0; $i < $num; $i++) {
$code .= substr($str, rand(0, strlen($str) - 1), 1);
}
return $code;
這是我的,因為字符可重復使用
$code = "";
for ($i = 0; $i < $num; $i++) {
$code .= substr($str, rand(0, strlen($str) - 1), 1);
}
return $code;
這是我的,因為字符可重復使用
2017-07-08