php token生成
function token($prefix = "")
{
$str = md5(uniqid(mt_rand(), true));
$_id = substr($str, 0, 8) . '-';
$_id .= substr($str, 8, 4) . '-';
$_id .= substr($str, 12, 4) . '-';
$_id .= substr($str, 16, 4) . '-';
$_id .= substr($str, 20, 12);
return $prefix . $_id;
}
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »