-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·34 lines (25 loc) · 792 Bytes
/
index.php
File metadata and controls
executable file
·34 lines (25 loc) · 792 Bytes
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
$start_time = microtime();
function __autoload($class_name) {
$dirClass = explode("_", $class_name);
if (sizeof($dirClass) > 1) {
$class_name = implode(DIRECTORY_SEPARATOR, $dirClass) . '.php';
} else {
$class_name = $class_name . '.php';
};
require_once $class_name;
}
$file_config = 'system/config.ini';
$config = parse_ini_file($file_config, true);
$config["path"]["root"] = dirname(__FILE__);
$config["url"] = $_SERVER["HTTP_HOST"];
$config["ip"] = $_SERVER['REMOTE_ADDR'];
$config["uri"] = $_SERVER["REQUEST_URI"];
$paths = implode(PATH_SEPARATOR, array(
$config["path"]["root"] . $config['path']['library'],
$config["path"]["root"] . $config['path']['application']
));
set_include_path($paths);
$bootstrap = new Engine_Bootstrap();
$bootstrap->run($config);
?>