2020-10-03 17:23:32 +08:00
|
|
|
<?php
|
2020-10-05 13:43:53 +08:00
|
|
|
|
|
|
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
|
|
header("Access-Control-Allow-Methods: *");
|
|
|
|
|
header('Access-Control-Allow-Headers:*');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error_reporting(E_ALL ^ E_NOTICE);
|
|
|
|
|
|
|
|
|
|
error_reporting(E_ALL ^ E_WARNING);
|
|
|
|
|
|
2020-10-03 17:23:32 +08:00
|
|
|
//内存限制
|
2020-10-05 13:43:53 +08:00
|
|
|
ini_set ('memory_limit', '1024M');
|
2020-10-03 17:23:32 +08:00
|
|
|
//应用目录为当前目录
|
|
|
|
|
define('APP_PATH',__DIR__.'/');
|
|
|
|
|
|
|
|
|
|
//开启调试模式
|
|
|
|
|
define('APP_DEBUG',true);
|
|
|
|
|
|
|
|
|
|
//加载框架文件
|
|
|
|
|
require APP_PATH.'fastphp/Fastphp.php';
|
|
|
|
|
|
|
|
|
|
//加载配置文件
|
|
|
|
|
$config = require APP_PATH.'config/config.php';
|
|
|
|
|
|
|
|
|
|
//实例化框架类
|
|
|
|
|
(new fastphp\Fastphp($config))->run();
|
|
|
|
|
|