-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
43 lines (28 loc) · 1.11 KB
/
index.php
File metadata and controls
43 lines (28 loc) · 1.11 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
41
42
43
<?php
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300)
die('Ext-PHP requires PHP 5.3 or higher');
error_reporting(E_ALL | E_STRICT);
$application = 'app';
$system = 'system';
define('EXT','.php');
define('CONTROLLER_NAMESPACE','_Controller');
// Set the full path to the docroot
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
// Make the application relative to the docroot, for symlink'd index.php
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
$application = DOCROOT.$application;
// Make the system relative to the docroot, for symlink'd index.php
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$system = DOCROOT.$system;
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
// Clean up the configuration vars
unset($application, $system);
if (is_dir('install'))
{
//die('installation directory is exist, please remove or rename it');
}
// Bootstrap the application
require SYSPATH.'loader'.EXT;
require APPPATH.'loader'.EXT;