forked from ronmarasigan/PIP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·40 lines (32 loc) · 1.15 KB
/
index.php
File metadata and controls
executable file
·40 lines (32 loc) · 1.15 KB
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
<?php
/*
* PIP v0.5.3
*/
//Start the Session
session_start();
// Defines
define('ROOT_DIR', realpath(dirname(__FILE__)) .'/');
define('APP_DIR', ROOT_DIR .'application/');
if(!$_SERVER['QUERY_STRING'])
define('CURRENT_PAGE', '/index');
else
define('CURRENT_PAGE', $_SERVER['QUERY_STRING']);
// Apply core configuration
global $config;
//Populating autoload table with default classes (Controller, Model and View)
$config['autoload'] = array();
$config['autoload']['Controller\Controller'] = ROOT_DIR .'system/mvc/controller.php';
$config['autoload']['Model\Model'] = ROOT_DIR .'system/mvc/model.php';
$config['autoload']['Model\ModelNoDB'] = ROOT_DIR .'system/mvc/model.nodb.php';
$config['autoload']['View\View'] = ROOT_DIR .'system/mvc/view.php';
$config['autoload']['Debug'] = ROOT_DIR .'system/utils/debug.php';
$config['autoload']['Route'] = ROOT_DIR.'system/utils/route.php';
$config['autoload']['Router'] = ROOT_DIR.'system/utils/route.php';
// Includes
require(ROOT_DIR .'system/utils/handlers.php');
require(ROOT_DIR .'system/pip.php');
require(APP_DIR .'config/config.php');
Debug::getInstance();
define('BASE_URL', $config['base_url']);
Controller\pip();
?>