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; 转载请注明:IT起义 » PHP个人常用资料 赞微海报分享 喜欢 (0)or分享 (0)