1.方法一:

<?php
    md5(uniqid('aa',true));
?>

2.方法2:

//生成16位的串
$randLength=6; $chars='abcdefghijklmnopqrstuvwxyz'; $len=strlen($chars); $randStr=''; for ($i=0;$i
<$randLength;$i++){ $randStr.=$chars[rand(0,$len-1)]; } $tokenvalue=$randStr.time();

 3.方法3:

$str = str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
$str = $str.uniqid();
return md5($str);

  

相关文章:

  • 2022-01-11
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-09-29
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-08-13
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
相关资源
相似解决方案