<input type="text" name="username" class="form-control" placeholder="用户名" value="user" required autofocus>
<input type="password" name="password" class="form-control" placeholder="密码" value="123456" required>
<input type="text" name="secodeverify" class="form-control" placeholder="验证码" required>
if(!$this->check_verify($secodeverify)){
$this->error('验证码输入错误!');
}
public function verify($id=''){
$verify = new \Think\Verify();
return $verify->entry($id);
}
function check_verify($code, $id = ''){
$verify = new \Think\Verify();
return $verify->check($code, $id);
}
就是一直验证不通过。
最佳答案