Home >php教程 >PHP源码 >php自动生成新密码自定义函数

php自动生成新密码自定义函数

PHP中文网
PHP中文网Original
2016-05-25 17:15:411000browse

跳至

<?php 
/*
 * php自动生成新密码自定义函数(带实例演示)
      适用环境: PHP5.2.x  / mysql 5.0.x
       代码作者: xujiajay
       联系方式: xujiaphp@gmail.com
* */


function genPassword($min = 5, $max = 8)   
{   
    $validchars="abcdefghijklmnopqrstuvwxyz123456789";   
    $max_char=strlen($validchars)-1;   
    $length=mt_rand($min,$max);   
    $password = "";   
	for($i=0;$i

                   

Statement:
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