<?php




// [ 应用入口文件 ]
namespace think;
//if(!extension_loaded('swoole_loader')){
//    header('Location:/swoole_loader_helper.php');
//    exit();
//}


if (version_compare(PHP_VERSION, '7.4.0', '<'))
	die('require PHP > 7.4.0 !');
// 检测PHP环境  允许前端跨域请求
header("Access-Control-Allow-Origin:*");
// 响应类型
header('Access-Control-Allow-Methods:GET, POST, PUT, DELETE');
// 响应头设置
header('Access-Control-Allow-Headers:x-requested-with, content-type');

if (!file_exists('./install.lock')) {
    header('location: ./install.php');
    exit();
}

define('QN_MODULE_NAME','ddjz');
define('QN_MODULE_NAME_LABEL','青桔云SAAS');

$query_string = substr($_SERVER["QUERY_STRING"], -3);
$array = [ '.jpg', '.png', 'css', '.js', 'txt', 'doc', 'ocx', 'peg' ];
if (in_array($query_string, $array)) {
	exit();
}

require __DIR__ . '/vendor/autoload.php';

// 执行HTTP应用并响应
$http = (new App())->http;

$response = $http->run();

$response->send();

$http->end($response);
