thinkphp 怎么自动验证登陆页面
1个回答
2016-08-04 · 知道合伙人互联网行家
关注
展开全部
代码如下:
$table_User = D("User");
if(!$table_User->create($_POST,4)){//登陆失败
$msg['info'] = $User->getError();
$msg['status'] = "error";
$this->ajaxReturn($msg);
} else {
$msg['info'] = "成功登陆,正在跳转会员中心!";
$msg['status'] = "success";
$msg['url'] = U("Index/index");
$this->ajaxReturn($msg);
}
$this->ajaxReturn($msg);
exit;
array('username','checkUsername','用户名不正确',1,'function',4), //登录时验证账号
array('password','checkPassword','密码不正确',1,'function',4), //登录时验证账号
$table_User = D("User");
if(!$table_User->create($_POST,4)){//登陆失败
$msg['info'] = $User->getError();
$msg['status'] = "error";
$this->ajaxReturn($msg);
} else {
$msg['info'] = "成功登陆,正在跳转会员中心!";
$msg['status'] = "success";
$msg['url'] = U("Index/index");
$this->ajaxReturn($msg);
}
$this->ajaxReturn($msg);
exit;
array('username','checkUsername','用户名不正确',1,'function',4), //登录时验证账号
array('password','checkPassword','密码不正确',1,'function',4), //登录时验证账号
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询