-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.php
executable file
·31 lines (31 loc) · 1.24 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
<?php
@session_start();
/**
* Skytells PHP Framework --------------------------------------------------*
* @category Web Development ( Programming )
* @package Skytells PHP Framework
* @version 3.9
* @copyright 2007-2018 Skytells, Inc. All rights reserved.
* @license MIT | https://www.skytells.net/us/terms .
* @author Dr. Hazem Ali ( fb.com/Haz4m )
* @see The Framework's changelog to be always up to date.
*/
$ENV_STARTUP_TIME=microtime(TRUE);
$ENVIRONMENT_CONFIG['ENVIRONMENT_PATH'] = "Core";
$ENVIRONMENT_CONFIG['APPLICATION_PATH'] = "Application";
define("BASEPATH", __DIR__.'/', TRUE);
define("IS_CORE_CLI", FALSE);
require BASEPATH.$ENVIRONMENT_CONFIG['ENVIRONMENT_PATH']."/Global.php";
if (CACHE_SYS === true) {
require ENV_ECOSYSTEM_DIR.'/Cache.php';
$Ca = new Cache(); $Ca->start(); }
Router::Init();
$ROOT_PATH = (ROOT_PATH == '') ? '' : '/'.ROOT_PATH;
Router::setBasePath($ROOT_PATH);
forceSSLCheck(); $Core = new Boot();
$match = Router::match();
if( $match && is_callable( $match['target'] ) ) { call_user_func_array( $match['target'], $match['params'] ); }
else { show_404(); }
if (CACHE_SYS === true) { $Ca->end(); }
$ENV_END_TIME = microtime(true) - $ENV_STARTUP_TIME;
DevTools();