方法一
代码如下 | 复制代码 |
function generate_password( $length = 8 ) { $password = ''; return $password; |
方法二
动生成6位数字、字母 混合密码
代码如下 | 复制代码 |
$str = "0123456789abcdefghijklmnopqrstuvwxyz"; // 输出字符集 $n = 6; // 输出串长度 $len = strlen($str)-1; for($j=0 ; $jfor($i=0 ; $i $s .= $str[rand(0,$len)]; } echo $s . " "; $s = ""; } ?> 自动生成数字、字母、符号的密码 $a = "12345678"; $b = "abcdefghijklmnopqistuvwxyz"; $s = substr(str_shuffle($a), 0, 2); $e = substr(str_shuffle($b), 0, 2); echo $s . substr(str_shuffle("!@#$%^&*"), 0, 2) . $e; ?> |
方法三
代码如下 | 复制代码 |
function create_password($pw_length = 8) // 调用该函数,传递长度参数$pw_length = 6 |
方法三
代码如下 | 复制代码 |
function getmicrotime() // 输出运行总时间 |
本文地址:
转载随意,但请附上文章地址:-)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version
Useful JavaScript development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Zend Studio 13.0.1
Powerful PHP integrated development environment