$sn = I('post.sn');
//验证传入的验证码是否正确
$verify = new \Think\Verify();
if(!$verify->check($sn)){
$this -> error('验证码错误,请重试!');
}
这是login方法,然后出错会返回到 index方法里 默认如果错了 它是不会自动刷新的
=====================
http://www.thinkphp.cn/topic/31105.html 这里有个方法
$this->success('验证码不正确!');exit;
有没更好的呢?