<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// [ 应用入口文件 ]
namespace think;
// 检测程序安装
if(!is_file(__DIR__ . '/data/install.lock')){
	header('Location: /install.php');
	exit;
}
if (version_compare("5.6", PHP_VERSION, ">")) {
	header("Content-type: text/html; charset=utf-8");
    die("<div style='text-align:center;'><font style='font-size:140px;color:red;'>ERROR</font><br><font style='font-size:28px;'>当前PHP版本为：".PHP_VERSION."<br>RGCMS必须在PHP5.6+以上环境运行!!!</font></div>");
}
define('ENTER_NAME', 'HOME');
define('APP_PATH', __DIR__ . '/app/');
define('DS', DIRECTORY_SEPARATOR);
// 加载基础文件
require __DIR__ . '/thinkphp/base.php';

// 支持事先使用静态方法设置Request对象和Config对象
// 执行应用并响应
Container::get('app',[APP_PATH])->bind('home')->run()->send();