setcookie('username',$user,time()+3600*24); //cookie赋值
public function login(){
//cookie 使用
if($_COOKIE['user']){
$this->assign('user',$_COOKIE['user']);
}
if($_COOKIE['pwd']){
$this->assign('pwd',$_COOKIE['pwd']);
}
$this->display();
}