- <?php
- namespace Admin\Controller;
- use Think\Controller;
- class BaseController extends Controller {
- public function _initialize(){
- if (isset($_SESSION['user_name'])) {
- //已登陆,不做任何操作
- }else{
- // $this->redirect('Login/login');
- $this->error('非法操作!',U('Login/login'));
- }
- }
- }
|