onethink 系统函数中 生成随机加密key

<?php
/**
 * 生成系统AUTH_KEY
 */
function build_auth_key(){
    $chars  = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $chars .= '`~!@#$%^&*()_+-=[]{};:"|,.<>/?';
    $chars  = str_shuffle($chars);
    return substr($chars, 0, 40);
}
?>

 

posted @ 2016-11-29 14:52  李照耀  阅读(295)  评论(0编辑  收藏  举报