📜  在 php 代码示例中自动生成密码

📅  最后修改于: 2022-03-11 14:54:48.987000             🧑  作者: Mango

代码示例1
function rand_string( $length ) {
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    return substr(str_shuffle($chars),0,$length);
}

echo rand_string(8);