46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
||
/**
|
||
* @copyright Copyright (c) 2023 美天智能科技
|
||
* @author 李志强
|
||
* @link http://www.meteteme.com
|
||
*/
|
||
|
||
// [ 应用入口文件 ]
|
||
namespace think;
|
||
|
||
if (empty(file_exists(__DIR__ . '/../vendor/autoload.php'))) {
|
||
echo '您还未安装PHP依赖包,请输入命令安装:composer install,安装教程点击<a href="https://blog.gougucms.com/home/book/detail/bid/3/id/7.html" target="_blank">这里</a>。';
|
||
exit;
|
||
}
|
||
require __DIR__ . '/../vendor/autoload.php';
|
||
|
||
header("Access-Control-Allow-Origin: *");
|
||
header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
|
||
header("Access-Control-Allow-Headers: x-requested-with, content-type, token");
|
||
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
|
||
exit(0); // 预检请求返回成功
|
||
}
|
||
|
||
|
||
// 定义当前版本号
|
||
define('CMS_VERSION', '3.1.12');
|
||
|
||
// 定义Layui版本号
|
||
define('LAYUI_VERSION', '2.7.6');
|
||
|
||
// 定义系统版本号
|
||
define('SYS_VERSION', '1.0.1');
|
||
|
||
// 定义项目目录
|
||
define('CMS_ROOT', __DIR__ . '/../');
|
||
|
||
// 执行HTTP应用并响应
|
||
$http = (new App())->http;
|
||
|
||
$response = $http->run();
|
||
|
||
$response->send();
|
||
|
||
$http->end($response);
|
||
|