-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.php
43 lines (38 loc) · 1.14 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
<?php
/**
* TITAN Mini MVC Framework
*
* Titan is a simple mvc application framework for php developers.
*
* @author Turan Karatuğ - <[email protected]> - <www.turankaratug.com>
* @version 1.1.4
* @copyright 2017
* @license https://opensource.org/licenses/MIT
* @link https://github.com/tkaratug/titan-mvc
*/
// Constants
define('BASE_DIR', '/');
define('ROOT_DIR', realpath(dirname(__FILE__)) .'/');
define('SYSTEM_DIR', ROOT_DIR .'system/');
define('APP_DIR', ROOT_DIR .'app/');
define('PUBLIC_DIR', rtrim(BASE_DIR, '/') . '/public/');
define('VERSION', '1.1.4');
define('DIRECT', true);
define('ENVIRONMENT', 'development'); // production | development
// Error Reporting
if(ENVIRONMENT == 'production') {
error_reporting(0);
ini_set('display_errors', 0);
} else {
error_reporting(E_ALL);
ini_set('display_errors', 1);
}
// General Functions
require_once SYSTEM_DIR . 'core/Functions.php';
// Loading core classes
require_once SYSTEM_DIR . 'core/App.php';
require_once SYSTEM_DIR . 'core/Loader.php';
require_once SYSTEM_DIR . 'core/Controller.php';
require_once SYSTEM_DIR . 'core/Model.php';
// Starting Titan
$app = new App();