<?php
if($_GET['st']){
//生成14位不重复的字符串:数字和字母混合
$a = substr(md5(date("Ymdhis")),0,14);
//14位数字,可能有重复
$a = rand(1000000,9999999).rand(1000000,9999999);
//以上两种随机方式保留其一即可
echo $a."<br />";
}
?>
<input type="button" onclick="location.href='?st=1'" value="生成随机数" />
温馨提示:答案为网友推荐,仅供参考