-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·44 lines (34 loc) · 1.22 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
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Copyright 2008, Jefferson González (JegoYalu.com)
* This file is part of Jaris CMS and licensed under the GPL,
* check the LICENSE.txt file for version and details or visit
* https://opensource.org/licenses/GPL-3.0.
*
* The main execution entry point of Jaris CMS.
*/
//Check PHP version complies with the minimum required.
if (substr(PHP_VERSION, 0, 1) < 7 && substr(PHP_VERSION, 2, 1) < 1) {
exit("Error: please use PHP 7.1.0 or later.");
}
//Time when script started executing useful to measure execution time.
$time_start = microtime(true);
//Register autoloader
require 'src/Autoloader.php';
Jaris\Autoloader::register();
//Shorthand functions commonly used on legacy templates
require 'src/Aliases.php';
//Include backward compatible functions if include dir exists
if (file_exists("include/forms.php")) {
require 'src/DeprecatedFunctions.php';
}
//Initialize settings.
Jaris\Site::init();
//Try to do a fast cache page retreival
Jaris\System::fastCacheIfPossible(Jaris\Uri::get());
//Load installed modules
Jaris\Site::loadModules();
//Continue normal processing and render requested page
Jaris\Site::bootStrap();
//Display amount of time that took to render the page if enabled.
Jaris\Site::printStats();