forked from bourakis/yafyaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
45 lines (34 loc) · 919 Bytes
/
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 session_start();
/**
* Bootstrap file.
*
* @author Andreas Bourakis <[email protected]>
* @contributors
* @copyright omicro.net
* @link http://www.github.com/addboo/yaf
* @license http://www.opensource.org/licenses/mit-license.php
* @requires
*
* @version: 0.1
**/
/**
* DESCRIPTION:
* Bootstrap file.
*
*
**/
// Paths initialisation.
$_SESSION['BASE_PATH'] = dirname(__FILE__);
$_SESSION['CORE_PATH'] = dirname(__FILE__).'/core';
$_SESSION['CONFIG_PATH'] = dirname(__FILE__).'/protected/configs/';
// Get config contents.
$cfg = require_once($_SESSION['CONFIG_PATH'].'config.php');
// Set Application's path.
$_SESSION['APP_PATH'] = dirname(__FILE__)."/".$cfg['app_dir_name'];
require_once($_SESSION['CORE_PATH'].'/Timer.php');
$timeEx = new Timer();
$timeEx->reStart();
require_once($_SESSION['CORE_PATH'].'/Yaf.php');
Yaf::run($cfg);
echo "Requested time: ". $timeEx->theTime();
?>