Home > php教程 > PHP源码 > body text

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

PHP中文网
Release: 2016-05-25 17:15:41
Original
975 people have browsed it

跳至

<?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
Copy after login

                   

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template