-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.php
More file actions
21 lines (20 loc) · 833 Bytes
/
index.php
File metadata and controls
21 lines (20 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
//解决跨域问题
header('Access-Control-Allow-Credentials: true'); //设为true,即表示服务器明确许可,Cookie可以包含在请求中,一起发给服务器
header("Access-Control-Allow-Origin:*");
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Requested-With, X_Requested_With');
//开启报错显示
ini_set("display_errors", "On");
error_reporting(E_ALL);
define("ROOT_PATH", dirname(__FILE__).DIRECTORY_SEPARATOR);
define("HTTP_HOST", $_SERVER['HTTP_HOST'].'/');
define("ENGINE_PATH", ROOT_PATH.'hl/');
//引入常量
include(ENGINE_PATH.'HLConst.php');
//引入引擎
include(ENGINE_PATH.'HLEngine.php');
$config = require(ROOT_PATH.'config/console.php');
$e = new hl\HLEngine($config);
$e->run();
// test