-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
45 lines (33 loc) · 1.18 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
45
<?php require_once("language/Lang.php"); session_start();// fuck tophost
require_once("system/AbstractDAO.php");
require_once("system/InterfaceBean.php");
require_once("system/AbstractBean.php");
require_once("import.php");
error_reporting(E_ALL ^ E_NOTICE);
date_default_timezone_set('UTC');
function autoload($class_name)
{
// Pre callback
$time_start = microtime(true);
$autoloadDirs = array('models', 'classes', 'controllers','system','config', 'language', 'lib');
foreach($autoloadDirs as $dir)
{
if(file_exists($dir.'/'.$class_name.'.php'))
{
require_once($dir.'/'.$class_name.'.php');
}
}
if(file_exists($class_name.'.php'))
{
require_once($class_name.'.php');
}
Logger::log(Logger::$DEBUG, "autoloaded className $class_name");
// Post callback
$time_end =microtime(true);
$time = $time_end - $time_start;
Logger::log(Logger::$PROFILING,"Function : autoload - execution time : $time s");
}
spl_autoload_register('autoload');
Logger::log(Logger::$INFO, "Framework started! I'm gona register autoload");
Dispatcher::Run(initConfig::getInstance()->getConfig()->getProperty('base_path'));
?>