首页 >后端开发 >php教程 >php生成随机字符串

php生成随机字符串

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-07-25 08:45:36868浏览
  1. $str="0123456789abcdefghijklmnopqrstuvwxyz";
  2. $tmp=$str[mt_rand(0,35)].$str[mt_rand(0,35)].$str[mt_rand(0,35)].$str[mt_rand(0,35)].$str[mt_rand(0,35)];
  3. echo $tmp;?>
复制代码

php


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn