/** * 设置前缀 * * @param string $url * @access public * @return void */ public static function setPrefix($url) { self::$_prefix = md5($url); }
public function check($code, $key = '') { $key = $this->authcode($this->seKey) . $key; // 验证码不能为空 $secode = Forum_Util_Session::get($key); if (empty($code) || empty($secode)) { return false; } // session 过期 if ($this->_nowTime->timeStamp - $secode['verify_time'] > $this->expire) { Forum_Util_Session::delete($key); return false; } if ($this->authcode(strtoupper($code)) == $secode['verify_code']) { $this->reset && Forum_Util_Session::delete($key); return true; } return false; }