blob: b7fdfff1d6372a4dc3474d2ab958a5c75ec270d0 [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/*
admin1af55492006-09-22 21:43:38 +000048|===============================================================
admin784add72006-10-30 20:24:26 +000049| END OF USER CONFIGURABLE SETTINGS
admin1af55492006-09-22 21:43:38 +000050|===============================================================
adminb0dd10f2006-08-25 17:25:49 +000051*/
52
admin784add72006-10-30 20:24:26 +000053
54/*
55|---------------------------------------------------------------
56| SET THE SERVER PATH
57|---------------------------------------------------------------
58|
59| Let's attempt to determine the full-server path to the "system"
60| folder in order to reduce the possibility of path problems.
Rick Ellis09066a42007-06-09 01:00:06 +000061| Note: We only attempt this if the user hasn't specified a
62| full server path.
admin784add72006-10-30 20:24:26 +000063|
64*/
Rick Ellis09066a42007-06-09 01:00:06 +000065if (strpos($system_folder, '/') === FALSE)
adminb0dd10f2006-08-25 17:25:49 +000066{
Rick Ellis09066a42007-06-09 01:00:06 +000067 if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
68 {
69 $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
70 }
71}
72else
73{
74 // Swap directory separators to Unix style for consistency
75 $system_folder = str_replace("\\", "/", $system_folder);
adminb0dd10f2006-08-25 17:25:49 +000076}
77
admin784add72006-10-30 20:24:26 +000078/*
79|---------------------------------------------------------------
80| DEFINE APPLICATION CONSTANTS
81|---------------------------------------------------------------
82|
83| EXT - The file extension. Typically ".php"
84| FCPATH - The full server path to THIS file
85| SELF - The name of THIS file (typically "index.php)
86| BASEPATH - The full server path to the "system" folder
87| APPPATH - The full server path to the "application" folder
88|
89*/
adminb0dd10f2006-08-25 17:25:49 +000090define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
admin1af55492006-09-22 21:43:38 +000091define('FCPATH', __FILE__);
adminb0dd10f2006-08-25 17:25:49 +000092define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
93define('BASEPATH', $system_folder.'/');
admincef21062006-10-30 17:13:13 +000094
admin784add72006-10-30 20:24:26 +000095if (is_dir($application_folder))
admincef21062006-10-30 17:13:13 +000096{
admin784add72006-10-30 20:24:26 +000097 define('APPPATH', $application_folder.'/');
admincef21062006-10-30 17:13:13 +000098}
99else
100{
admin784add72006-10-30 20:24:26 +0000101 if ($application_folder == '')
102 {
103 $application_folder = 'application';
104 }
105
admincef21062006-10-30 17:13:13 +0000106 define('APPPATH', BASEPATH.$application_folder.'/');
107}
adminb0dd10f2006-08-25 17:25:49 +0000108
admin784add72006-10-30 20:24:26 +0000109/*
110|---------------------------------------------------------------
111| DEFINE E_STRICT
112|---------------------------------------------------------------
113|
114| Some older versions of PHP don't support the E_STRICT constant
115| so we need to explicitly define it otherwise the Exception class
116| will generate errors.
117|
118*/
119if ( ! defined('E_STRICT'))
120{
121 define('E_STRICT', 2048);
122}
123
124/*
125|---------------------------------------------------------------
126| LOAD THE FRONT CONTROLLER
127|---------------------------------------------------------------
128|
129| And away we go...
130|
131*/
adminb0dd10f2006-08-25 17:25:49 +0000132require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
133?>