forked from CrystalCollective/CrystalPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
34 lines (28 loc) · 1.06 KB
/
index.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
30
31
32
33
34
<?php
/*******************************************************************************
*
* CrystalPHP Framework by Crystal Collective
* An open source application development framework for PHP
*
* This file is part of CrystalPHP which is released under the MIT License (MIT)
*
* Copyright (c) 2019 - 2019, Crystal Collective
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
*
******************************************************************************/
$_SERVER['REQUEST_TIME_SCRIPT_START'] = microtime(true);
define("TIME_START", $_SERVER['REQUEST_TIME_SCRIPT_START']);
$root_path = __DIR__;
// Windows IIS Compatibility
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
define('IS_WINDOWS', true);
$root_path = str_replace('\\', '/', $root_path);
}
define('DIR_ROOT', $root_path);
define('DIR_BASE', $root_path);
require_once "vendor/autoload.php";
use \CrystalPHP\App as App;
use \CrystalPHP\Registry as Registry;
App::app(Registry::getInstance())->initialize()->run();