1. 毫秒
echo date(“YmdHis”).floor(microtime()*1000);
echo “<br/>”;
2.生成16位字母+数字验证码
$string = ‘abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ123456789’;
$str = ”;
for ($i=0; $i < 16; $i++) {
$str.= $string[rand(0,strlen($string)-1)];
}
echo $str;
1. 毫秒
echo date(“YmdHis”).floor(microtime()*1000);
echo “<br/>”;
2.生成16位字母+数字验证码
$string = ‘abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ123456789’;
$str = ”;
for ($i=0; $i < 16; $i++) {
$str.= $string[rand(0,strlen($string)-1)];
}
echo $str;