public function _initialize(){ if(!$_SESSION['username']){ $this->error('请先登录',U('Admin/Login/index')); } }