tp5基本登录
<?php
namespace app\admin\controller;
use think\Controller;
use think\DB;
class Index extends Controller
{
// public function _initialize()
// {
// if (!empty(cookie('admin')) && cookie('admin') == 1) {
// } else {
// $this->redirect('login/index');
// }
// }
// 登录
public function login()
{
if ($_POST) {
}
// 渲染页面
return $this->fetch();
}