/* 验证码,用于登录和注册 */
public function verify(){
$config =array(
'length'=>4,
'fontSize'=>16,
'useNoise'=>false,
'imageW'=> 130,
'imageH'=>40
);
$verify = new \Think\Verify($config);
$verify->entry(1);
}
/* 验证码校验 */
public function check_verify($code,$id = ''){
$verify = new \Think\Verify();
$res = $verify->check($code,$id);
$this->ajaxReturn($res,'json');
}
检查后发现 session($key) 一直为空
跨域也做了
header("Access-Control-Allow-Credentials","true");
但是一直就是不起作用,
求大佬解答下,感谢了
最佳答案
