function do_login(){
//获取用户名和密码信息,和数据库中比对
echo 111111111;
dump($_POST);
dump($_SESSION);
echo 222222222;
$username=$_POST['username'];
$password=$_POST['password'];
$code=$_POST['code'];
if($_SESSION['verify']!==md5($code)){
$this->error('验证码错误');
}
111111111
array (size=3)
'username' => string 'admin' (length=5)
'password' => string 'admin' (length=5)
'code' => string '7038' (length=4)
array (size=3)
'verify' => string 'b19d3c9e40467f65287c078ea8970b83' (length=32)
'username' => string 'admin' (length=5)
'authority' => string '1' (length=1)
222222222
转载于:https://www.cnblogs.com/zhaoyangjian724/p/6199774.html