Skip to content

php_createkey_function

Latest

Choose a tag to compare

@injy injy released this 20 Mar 14:12
· 5 commits to main since this release
21ce8be

一个生成随机字符串的php函数。
两个参数:

  • @PARAM number $length 随机码的长度
  • @PARAM string $type n l L s 字符类型
  • @return string 随机码

使用方法:
随机生成一个20位长度的字母加数字组合字符串。

$key=createkey();

随机生成一个10位长度的数字

$key=createkey(10,'n');