选择语言 :

 Module_Session::create_session_id

生成一个新的Session ID

string Module_Session::create_session_id( )
返回值
  • string 返回一个32长度的session id
File: ./modules/session/session.class.php
public static function create_session_id()
{
    # 获取一个唯一字符
    $mt_str = substr(md5(microtime(1).'d2^2**(fgGs@.d3l-' . mt_rand(1, 9999999) . HttpIO::IP), 2, 28);

    # 校验位
    $mt_str .= substr(md5('doe9%32' . $mt_str . Session::$config['check_string']), 8, 4);

    return $mt_str;
}