summaryrefslogtreecommitdiffstats
path: root/index.php
blob: 8d7a30252458155b4f8aa7d5bd5ca922172b38b1 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php

/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI runs with error reporting set to ALL.  For security
| reasons you are encouraged to change this when your site goes live.
|
*/
error_reporting(E_ALL);

/*
|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same  directory 
| as this file.
|
| NO TRAILING SLASH!
|
*/

	$system_folder = "system";

/*
|---------------------------------------------------------------
| APPLICATION FOLDER NAME
|---------------------------------------------------------------
|
| If you want this front controller to use a different "application" 
| folder then the default one you can set its name here.
|
| NO TRAILING SLASH!
|
*/

	$application_folder = "application";

/*
|===============================================================
| 	END OF USER CONFIGURABLE SETTINGS
|===============================================================
*/

// Let's attempt to determine the full-server path to the "system"
// folder in order to reduce the possibility of path problems.
if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
{
	$system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder;
}

// Is the $aplication variable blank?  If so, we'll assume the folder is called "application"
if ($application_folder == '')
{
	$application_folder = 'application';
}

// Some versions of PHP don't support the E_STRICT constant so we'll 
// explicitly define it so that it will be available to the Exception class
if ( ! defined('E_STRICT'))
{
	define('E_STRICT', 2048);
}

// Define a few constants that we use througout the framework.
// EXT		- contains the file extension.  Typically ".php"
// FCPATH	- contains the full server path to THIS file.
// SELF		- contains the name of THIS file.  
// BASEPATH	- contains the full server path to the "system" folder
// APPPATH	- contains the full server path to the "application" folder

define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');
define('APPPATH', BASEPATH.$application_folder.'/');

// Load the front controller and away we go!....
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
?>