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

// [ 应用入口文件 ]
namespace think;


//header("Access-Control-Allow-Origin: http://localhost:5173"); // 允许来自本地开发服务器的请求
header("Access-Control-Allow-Origin: *"); // 允许跨域请求
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With");

require __DIR__ . '/../vendor/autoload.php';
define('APP_PATH', __DIR__ . '/../app/');
define('PUBLIC_PATH', __DIR__);

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

$response = $http->run();

$response->send();
$http->end($response);