|
|
|
@ -83,12 +83,9 @@ class Verify {
|
|
|
|
|
* @return bool 用户验证码是否正确
|
|
|
|
|
*/
|
|
|
|
|
public function check($code, $id = '') {
|
|
|
|
|
var_dump($_SESSION);
|
|
|
|
|
$key = $this->authcode($this->seKey).$id;
|
|
|
|
|
var_dump($key);
|
|
|
|
|
// 验证码不能为空
|
|
|
|
|
$secode = session($key);
|
|
|
|
|
var_dump($secode);
|
|
|
|
|
if(empty($code) || empty($secode)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -176,10 +173,7 @@ class Verify {
|
|
|
|
|
$secode = array();
|
|
|
|
|
$secode['verify_code'] = $code; // 把校验码保存到session
|
|
|
|
|
$secode['verify_time'] = NOW_TIME; // 验证码创建时间
|
|
|
|
|
|
|
|
|
|
session($key.$id, $secode);
|
|
|
|
|
var_dump($_SESSION);
|
|
|
|
|
die();
|
|
|
|
|
|
|
|
|
|
header('Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate');
|
|
|
|
|
header('Cache-Control: post-check=0, pre-check=0', false);
|
|
|
|
|