12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace app\admin\controller;
- use think\Controller;
- use think\Session;
- use think\Db;
- use think\Request;
- class Index extends Controller
- {
- protected function _initialize()
- {
- if(!session('?admin')){
- $this->redirect('login/index');
- }
- }
- public function index()
- {
- $session=session('admin');
-
- $this->assign('account', $session['username']);
- return $this->fetch();
-
- }
- }
|