php randomly generates strings and you can define the length you need. This is often encountered in actual application development.
Copy code The code is as follows:
//Randomly generate string
function random($length) {
srand(date("s"));
$possible_charactors = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$string = "";
while(strlen($string)<$length) {
$ string .= substr($possible_charactors,(rand()%(strlen($possible_charactors))),1);
; >
http://www.bkjia.com/PHPjc/764619.htmlwww.bkjia.com
truehttp: //www.bkjia.com/PHPjc/764619.htmlTechArticlephp randomly generates strings and you can define the length you need. This is often encountered in actual application development. Copy the code The code is as follows: // Randomly generate string function random($...