function Random_Password($length) {
srand(date("s"));
$possible_charactors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$string = "";
while(strlen($string)<$length) {
$string .= substr($possible_charactors,(rand()%(strlen($possible_charactors))),1);
}
return($string);
srand(date("s"));
$possible_charactors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$string = "";
while(strlen($string)<$length) {
$string .= substr($possible_charactors,(rand()%(strlen($possible_charactors))),1);
}
return($string);
解决方案 »
- PHP一个疑难问题-求高手解答
- php只请求网页文件的大小,不返回网页内容,
- linux下怎么编辑shell脚本啊。
- SQL-FRONT中存储过程字符类型转换的问题
- PHP中创建图形问题
- PHP5读取EXCEL内容时的一个正则表达式函数
- Cannot encode non-existent session.怎么回事?
- 关于PHP文件上传的问题!
- 请问在Windows98中如何设置Apache的虚拟目录?20分征答。
- 在表单中添加隐藏域 authenticity_token 有什么作用?
- 请问如何用php+javascript+mysql做树型菜单??(急啊)
- 一个有趣的小问题,preg_replace
substr(rand(100,200),1,2);