if (!IS_POST) E('页面不存在');
$username = I('username');
$password = I('password','','md5');
$adm = D("adm")->where(array('username' => $username))->find();
if (!$adm||$adm['password']!=$password){
$this->error('账号或密码错误!');
}
session('username',$username);
$this->redirect('Admin/index');
}
重定向后页面刷新为Admin/index,但浏览器的地址栏显示为http://localhost/ThinkPHP/index.php/Home/Login/login
最佳答案