自动验证问题

浏览:398 发布日期:2014/10/29 分类:求助交流 关键字: thinkPHP自动验证
自动验证类我这样写有错吗为什么用户名正确也跳出错误提示框
class UserModel extends Model{
protected $_validate=array(
array("username","require","用户名不能为空"),
array("pasword","require","密码不能为空"),
array("username","login","用户名或密码错误",1,"callback",3),
);
protected function login($date)
{
$m = M("User");
$where["usename"] = $date;
$a = $m->where($where)->field("usename")->count();
$b = (int)$a;
if($b>0)
{
return true;
}
else
{
return false;
}
}
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>