public function check($code, $id = '')
108 {
109 $key = $this->authcode($this->seKey) . $id;
110 // 验证码不能为空
111 $secode = Session::get($key, '');
dump($secode); //都是NULL
112 if (empty($code) || empty($secode)) {
113 return false;
114 }
115 // session 过期
116 if (time() - $secode['verify_time'] > $this->expire) {
117 Session::delete($key, '');
118 return false;
119 }
120
121 if ($this->authcode(strtoupper($code)) == $secode['verify_code']) {
122 $this->reset && Session::delete($key, '');
123 return true;
124 }
125
126 return false;
127 }
session驱动,换成file可以验证通过了 最佳答案
