30 lines
654 B
PHP
30 lines
654 B
PHP
<?php
|
|
namespace app\index\controller;
|
|
|
|
use app\common\controller\Common;
|
|
use think\facade\Request;
|
|
|
|
/**
|
|
* 前台公共控制器
|
|
* @package app\index\controller
|
|
*/
|
|
class Home extends Common
|
|
{
|
|
/**
|
|
* 初始化方法
|
|
* @author 蔡伟明 <314013107@qq.com>
|
|
*/
|
|
protected function initialize()
|
|
{
|
|
// 系统开关
|
|
if (!config('web_site_status')) {
|
|
$this->error('站点已经关闭,请稍后访问~');
|
|
}
|
|
|
|
// 重新加载内置的超全局数组:$_SERVER、$_GET、$_POST
|
|
Request::withServer($_SERVER);
|
|
Request::withGet($_GET);
|
|
Request::withPost($_POST);
|
|
}
|
|
}
|