mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-27 10:00:41 +00:00
fix makeRandomString()
This commit is contained in:
parent
e7e14325b3
commit
c304085c94
|
|
@ -50,9 +50,10 @@ class Utilities { /* {{{ */
|
|||
* @return string random string
|
||||
*/
|
||||
static public function makeRandomString($n, $alph = "0123456789abcdefghijklmnopqrstuvwxyz") { /* {{{ */
|
||||
$len = strlen($alph)-1;
|
||||
$s = "";
|
||||
for ($i = 0; $i != $n; ++$i)
|
||||
$s .= $alph[mt_rand(0, 35)];
|
||||
$s .= $alph[mt_rand(0, $len)];
|
||||
return $s;
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user