<?php

// [ 应用入口文件 ]
namespace think;
define('WWW_ROOT',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR);
// 检测PHP环境
if(version_compare(PHP_VERSION,'7.2.5','<')){
    header('HTTP/1.1 500 Internal Server Error');
    header('Content-Type:text/html;charset=utf-8');
    die('<div style="margin-top:15%;text-align:center;font-size:16px;padding:0 10px;"><p style="color:#f00;margin-top:10px;">需要PHP版本最低 v7.2.5，当前PHP版本 v'.PHP_VERSION.'</p></div>');
}

//前端缓存时间
define('HOME_CACHE_TIME', 86400);
//后端缓存时间
define('ADMIN_CACHE_TIME', 86400);
//缓存时间
define('COMMON_CACHE_TIME', 86400);

// PUBLIC目录运行
require __DIR__ . '/../vendor/autoload.php';

// 执行HTTP应用并响应
$http = (new App())->http;
$response = $http->name('home')->run();
$response->send();
$http->end($response);