Php

WBOY
Release: 2016-07-21 15:36:52
Original
1847 people have browsed it

涶嶅埗浠g爜 浠g爜濡备笅:

/*************
*@l - length of random string
*/
function generate_rand ($l){
$c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
for($i=0; $i<$l; $i++) {
$rand.= $c[rand()%strlen($c)];
}
return $rand;
}

杩欓噷鏄憳镊剼chain磣瀹Duo磣铓嶅彂宁卂殑鏂号珷銆曛洿澶氱殑鎶€宸у彲浠ュ嬬Key妦€?BR>退drop泦鄄勪穩鍗䷷竴涓 PHP

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322049.htmlTechArticle涶嶅埗浠g爜浠g爜濡备笅: /************* *@l - length of random string*/ function generate_rand( $l){ $c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; srand((...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template