PHP can read random string code. Copy the code as follows: **************** @ length-lengthofrandomstring (mustbeamultipleof2) * ************* functionreadable_random_string ($ length6) {$ sort array (
The code is as follows:
/**************
* @ Length-length of random string (must be a multiple of 2)
**************/
Function readable_random_string ($ length = 6 ){
$ Conso = array ("B", "c", "d", "f", "g", "h", "j", "k ", "l ",
"M", "n", "p", "r", "s", "t", "v", "w", "x", "y ", "z ");
$ Vocal = array ("a", "e", "I", "o", "u ");
$ Password = "";
Srand (double) microtime () * 1000000 );
$ Max = $ length/2;
For ($ I = 1; $ I <= $ max; $ I ++)
{
$ Password. = $ conso [rand (0, 19)];
$ Password. = $ vocal [rand (0, 4)];
}
Return $ password;
}
This is an excerpt from an article published before the home of scripts. For more tips, refer.
Collected 21 practical and convenient PHP function code
The http://www.bkjia.com/PHPjc/322046.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/322046.htmlTechArticle code is as follows:/************** @ length-length of random string (must be a multiple of 2) * ************/function readable_random_string ($ length = 6) {$ conso = array ("...