You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB
PHTML

5 years ago
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Home\Controller;
use Think\Controller;
/**
* 前台公共控制器
* 为防止多分组Controller名称冲突公共Controller名称统一使用分组名称
*/
class HomeController extends Controller {
/* 空操作用于输出404页面 */
public function _empty(){
$this->redirect('Index/index');
}
protected function _initialize(){
/* 读取站点配置 */
$config = api('Config/lists');
C($config); //添加配置
if(!C('WEB_SITE_CLOSE')){
$this->error('站点已经关闭,请稍后访问~');
}
}
public function rule()
{
$this->display();
}
}