<?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>
// +----------------------------------------------------------------------

// [ 检测是否已安装 ]
if (!file_exists(__DIR__ .'/../config/install.lock')) {
    header("location:/install/install.php");
    exit;
}

// [ 授权文件完整性检查 ]
$_auth_file = __DIR__ . '/../auth.php';
$_authcode_file = __DIR__ . '/../authcode.php';
if (!file_exists($_auth_file) || !file_exists($_authcode_file)) {
    // 授权文件被删除，触发致命错误
    trigger_error('', E_USER_ERROR);
    exit;
}



// [ 应用入口文件 ]
// 加载基础文件
require __DIR__ . '/../thinkphp/base.php';

define('ROOT_PATH',__DIR__);

// 执行应用并响应
think\Container::get('app')->run()->send();
