blob: 7b47d081cb8b570b3454e7fb85075e6ad05166cb [file] [log] [blame]
adminb0dd10f2006-08-25 17:25:49 +00001<?php
2
admin1af55492006-09-22 21:43:38 +00003/*
4|---------------------------------------------------------------
5| PHP ERROR REPORTING LEVEL
6|---------------------------------------------------------------
7|
admin8f0a8f62006-10-07 01:17:25 +00008| By default CI runs with error reporting set to ALL. For security
admin1af55492006-09-22 21:43:38 +00009| reasons you are encouraged to change this when your site goes live.
admin784add72006-10-30 20:24:26 +000010| For more info visit: http://www.php.net/error_reporting
admin1af55492006-09-22 21:43:38 +000011|
12*/
admin784add72006-10-30 20:24:26 +000013 error_reporting(E_ALL);
adminb0dd10f2006-08-25 17:25:49 +000014
15/*
admin1af55492006-09-22 21:43:38 +000016|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000017| SYSTEM FOLDER NAME
admin1af55492006-09-22 21:43:38 +000018|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000019|
admin1af55492006-09-22 21:43:38 +000020| This variable must contain the name of your "system" folder.
admine334c472006-10-21 19:44:22 +000021| Include the path if the folder is not in the same directory
admin1af55492006-09-22 21:43:38 +000022| as this file.
23|
24| NO TRAILING SLASH!
25|
adminb0dd10f2006-08-25 17:25:49 +000026*/
adminb0dd10f2006-08-25 17:25:49 +000027 $system_folder = "system";
28
29/*
admin1af55492006-09-22 21:43:38 +000030|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000031| APPLICATION FOLDER NAME
admin1af55492006-09-22 21:43:38 +000032|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000033|
admine334c472006-10-21 19:44:22 +000034| If you want this front controller to use a different "application"
admin784add72006-10-30 20:24:26 +000035| folder then the default one you can set its name here. The folder
36| can also be renamed or relocated anywhere on your server.
37| For more info please see the user guide:
admincef21062006-10-30 17:13:13 +000038| http://www.codeigniter.com/user_guide/general/managing_apps.html
39|
adminb0dd10f2006-08-25 17:25:49 +000040|
admin1af55492006-09-22 21:43:38 +000041| NO TRAILING SLASH!
adminb0dd10f2006-08-25 17:25:49 +000042|
43*/
admin1af55492006-09-22 21:43:38 +000044 $application_folder = "application";
adminb0dd10f2006-08-25 17:25:49 +000045
admin784add72006-10-30 20:24:26 +000046
adminb0dd10f2006-08-25 17:25:49 +000047/*
Rick Ellis268c26c2007-07-22 18:14:41 +000048|---------------------------------------------------------------
Rick Ellis03717d22007-07-22 18:22:22 +000049| Default Controller Data Assignment
Rick Ellis268c26c2007-07-22 18:14:41 +000050|---------------------------------------------------------------
51|
52| If you need any data passed by default to your controllers you
53| can use this variable. When a controller class is instantiated
Rick Ellis03717d22007-07-22 18:22:22 +000054| this data will be passed to the controller constructor.
Rick Ellis268c26c2007-07-22 18:14:41 +000055|
56*/
Rick Ellis03717d22007-07-22 18:22:22 +000057 $assign_to_controller = NULL;
Rick Ellis268c26c2007-07-22 18:14:41 +000058
59
60/*
admin1af55492006-09-22 21:43:38 +000061|===============================================================
admin784add72006-10-30 20:24:26 +000062| END OF USER CONFIGURABLE SETTINGS
admin1af55492006-09-22 21:43:38 +000063|===============================================================
adminb0dd10f2006-08-25 17:25:49 +000064*/
65
admin784add72006-10-30 20:24:26 +000066
67/*
68|---------------------------------------------------------------
69| SET THE SERVER PATH
70|---------------------------------------------------------------
71|
72| Let's attempt to determine the full-server path to the "system"
73| folder in order to reduce the possibility of path problems.
Rick Ellis09066a42007-06-09 01:00:06 +000074| Note: We only attempt this if the user hasn't specified a
75| full server path.
admin784add72006-10-30 20:24:26 +000076|
77*/
Rick Ellis09066a42007-06-09 01:00:06 +000078if (strpos($system_folder, '/') === FALSE)
adminb0dd10f2006-08-25 17:25:49 +000079{
Rick Ellis09066a42007-06-09 01:00:06 +000080 if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
81 {
82 $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
83 }
84}
85else
86{
87 // Swap directory separators to Unix style for consistency
88 $system_folder = str_replace("\\", "/", $system_folder);
adminb0dd10f2006-08-25 17:25:49 +000089}
90
admin784add72006-10-30 20:24:26 +000091/*
92|---------------------------------------------------------------
93| DEFINE APPLICATION CONSTANTS
94|---------------------------------------------------------------
95|
96| EXT - The file extension. Typically ".php"
97| FCPATH - The full server path to THIS file
98| SELF - The name of THIS file (typically "index.php)
99| BASEPATH - The full server path to the "system" folder
100| APPPATH - The full server path to the "application" folder
101|
102*/
adminb0dd10f2006-08-25 17:25:49 +0000103define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
admin1af55492006-09-22 21:43:38 +0000104define('FCPATH', __FILE__);
adminb0dd10f2006-08-25 17:25:49 +0000105define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
106define('BASEPATH', $system_folder.'/');
admincef21062006-10-30 17:13:13 +0000107
admin784add72006-10-30 20:24:26 +0000108if (is_dir($application_folder))
admincef21062006-10-30 17:13:13 +0000109{
admin784add72006-10-30 20:24:26 +0000110 define('APPPATH', $application_folder.'/');
admincef21062006-10-30 17:13:13 +0000111}
112else
113{
admin784add72006-10-30 20:24:26 +0000114 if ($application_folder == '')
115 {
116 $application_folder = 'application';
117 }
118
admincef21062006-10-30 17:13:13 +0000119 define('APPPATH', BASEPATH.$application_folder.'/');
120}
adminb0dd10f2006-08-25 17:25:49 +0000121
admin784add72006-10-30 20:24:26 +0000122/*
123|---------------------------------------------------------------
124| DEFINE E_STRICT
125|---------------------------------------------------------------
126|
127| Some older versions of PHP don't support the E_STRICT constant
128| so we need to explicitly define it otherwise the Exception class
129| will generate errors.
130|
131*/
132if ( ! defined('E_STRICT'))
133{
134 define('E_STRICT', 2048);
135}
136
137/*
138|---------------------------------------------------------------
139| LOAD THE FRONT CONTROLLER
140|---------------------------------------------------------------
141|
142| And away we go...
143|
144*/
adminb0dd10f2006-08-25 17:25:49 +0000145require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
146?>