blob: eb364ec0395d8db32c004ae2053060026fcbe8a2 [file] [log] [blame]
adminb0dd10f2006-08-25 17:25:49 +00001<?php
admin1af55492006-09-22 21:43:38 +00002/*
3|---------------------------------------------------------------
4| PHP ERROR REPORTING LEVEL
5|---------------------------------------------------------------
6|
admin8f0a8f62006-10-07 01:17:25 +00007| By default CI runs with error reporting set to ALL. For security
admin1af55492006-09-22 21:43:38 +00008| reasons you are encouraged to change this when your site goes live.
admin784add72006-10-30 20:24:26 +00009| For more info visit: http://www.php.net/error_reporting
admin1af55492006-09-22 21:43:38 +000010|
11*/
admin784add72006-10-30 20:24:26 +000012 error_reporting(E_ALL);
adminb0dd10f2006-08-25 17:25:49 +000013
14/*
admin1af55492006-09-22 21:43:38 +000015|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000016| SYSTEM FOLDER NAME
admin1af55492006-09-22 21:43:38 +000017|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000018|
admin1af55492006-09-22 21:43:38 +000019| This variable must contain the name of your "system" folder.
admine334c472006-10-21 19:44:22 +000020| Include the path if the folder is not in the same directory
admin1af55492006-09-22 21:43:38 +000021| as this file.
22|
23| NO TRAILING SLASH!
24|
adminb0dd10f2006-08-25 17:25:49 +000025*/
adminb0dd10f2006-08-25 17:25:49 +000026 $system_folder = "system";
27
28/*
admin1af55492006-09-22 21:43:38 +000029|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000030| APPLICATION FOLDER NAME
admin1af55492006-09-22 21:43:38 +000031|---------------------------------------------------------------
adminb0dd10f2006-08-25 17:25:49 +000032|
admine334c472006-10-21 19:44:22 +000033| If you want this front controller to use a different "application"
admin784add72006-10-30 20:24:26 +000034| folder then the default one you can set its name here. The folder
35| can also be renamed or relocated anywhere on your server.
36| For more info please see the user guide:
admincef21062006-10-30 17:13:13 +000037| http://www.codeigniter.com/user_guide/general/managing_apps.html
38|
adminb0dd10f2006-08-25 17:25:49 +000039|
admin1af55492006-09-22 21:43:38 +000040| NO TRAILING SLASH!
adminb0dd10f2006-08-25 17:25:49 +000041|
42*/
admin1af55492006-09-22 21:43:38 +000043 $application_folder = "application";
adminb0dd10f2006-08-25 17:25:49 +000044
admin784add72006-10-30 20:24:26 +000045
adminb0dd10f2006-08-25 17:25:49 +000046/*
Rick Ellis268c26c2007-07-22 18:14:41 +000047|---------------------------------------------------------------
Rick Ellis03717d22007-07-22 18:22:22 +000048| Default Controller Data Assignment
Rick Ellis268c26c2007-07-22 18:14:41 +000049|---------------------------------------------------------------
50|
51| If you need any data passed by default to your controllers you
52| can use this variable. When a controller class is instantiated
Rick Ellis03717d22007-07-22 18:22:22 +000053| this data will be passed to the controller constructor.
Rick Ellis268c26c2007-07-22 18:14:41 +000054|
55*/
Rick Ellis03717d22007-07-22 18:22:22 +000056 $assign_to_controller = NULL;
Rick Ellis268c26c2007-07-22 18:14:41 +000057
58
59/*
admin1af55492006-09-22 21:43:38 +000060|===============================================================
admin784add72006-10-30 20:24:26 +000061| END OF USER CONFIGURABLE SETTINGS
admin1af55492006-09-22 21:43:38 +000062|===============================================================
adminb0dd10f2006-08-25 17:25:49 +000063*/
64
admin784add72006-10-30 20:24:26 +000065
66/*
67|---------------------------------------------------------------
68| SET THE SERVER PATH
69|---------------------------------------------------------------
70|
71| Let's attempt to determine the full-server path to the "system"
72| folder in order to reduce the possibility of path problems.
Rick Ellis09066a42007-06-09 01:00:06 +000073| Note: We only attempt this if the user hasn't specified a
74| full server path.
admin784add72006-10-30 20:24:26 +000075|
76*/
Rick Ellis09066a42007-06-09 01:00:06 +000077if (strpos($system_folder, '/') === FALSE)
adminb0dd10f2006-08-25 17:25:49 +000078{
Rick Ellis09066a42007-06-09 01:00:06 +000079 if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
80 {
81 $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
82 }
83}
84else
85{
86 // Swap directory separators to Unix style for consistency
87 $system_folder = str_replace("\\", "/", $system_folder);
adminb0dd10f2006-08-25 17:25:49 +000088}
89
admin784add72006-10-30 20:24:26 +000090/*
91|---------------------------------------------------------------
92| DEFINE APPLICATION CONSTANTS
93|---------------------------------------------------------------
94|
95| EXT - The file extension. Typically ".php"
96| FCPATH - The full server path to THIS file
97| SELF - The name of THIS file (typically "index.php)
98| BASEPATH - The full server path to the "system" folder
99| APPPATH - The full server path to the "application" folder
100|
101*/
adminb0dd10f2006-08-25 17:25:49 +0000102define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
admin1af55492006-09-22 21:43:38 +0000103define('FCPATH', __FILE__);
adminb0dd10f2006-08-25 17:25:49 +0000104define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
105define('BASEPATH', $system_folder.'/');
admincef21062006-10-30 17:13:13 +0000106
admin784add72006-10-30 20:24:26 +0000107if (is_dir($application_folder))
admincef21062006-10-30 17:13:13 +0000108{
admin784add72006-10-30 20:24:26 +0000109 define('APPPATH', $application_folder.'/');
admincef21062006-10-30 17:13:13 +0000110}
111else
112{
admin784add72006-10-30 20:24:26 +0000113 if ($application_folder == '')
114 {
115 $application_folder = 'application';
116 }
117
admincef21062006-10-30 17:13:13 +0000118 define('APPPATH', BASEPATH.$application_folder.'/');
119}
adminb0dd10f2006-08-25 17:25:49 +0000120
admin784add72006-10-30 20:24:26 +0000121/*
122|---------------------------------------------------------------
admin784add72006-10-30 20:24:26 +0000123| LOAD THE FRONT CONTROLLER
124|---------------------------------------------------------------
125|
126| And away we go...
127|
128*/
adminb0dd10f2006-08-25 17:25:49 +0000129require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
130?>