<?php namespace Home\Controller; use Think\Controller; class IndexController extends Controller { public function Index(){ // 获取提交信息 if(empty($_POST['use']) || empty($_POST['pas'])){ $this->error('请先登录','Index/login'); } }