-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.php
29 lines (21 loc) · 871 Bytes
/
boot.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* TimoPHP a Fast Simple Smart PHP FrameWork
* Author: Tommy [email protected]
* Link: http://www.TimoPHP.com/
* Since: 2016
*/
date_default_timezone_set('Asia/Chongqing');
//检查环境版本
version_compare(PHP_VERSION, '7.2.0', '>=') || die('requires PHP 7.2.0+ Please upgrade!');
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
defined('ROOT_PATH') || die('[TimoPHP] undefined ROOT_PATH constant.');
defined('APP_DIR_PATH') || define('APP_DIR_PATH', ROOT_PATH . 'app' . DS);
define('FRAME_PATH', __DIR__ . DS);
//环境常量
define('IS_CGI', strpos(PHP_SAPI, 'cgi') !== false ? 1 : 0);
define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0);
define('IS_MAC', strstr(PHP_OS, 'Darwin') ? 1 : 0);
define('IS_CLI', PHP_SAPI == 'cli' ? 1 : 0);
define('NOW_TIME', $_SERVER['REQUEST_TIME']);
require FRAME_PATH . 'src' . DS . 'Core' . DS . 'Engine.php';