blob: 315b43c8eb83bb57a136486675baca84bc0dd690 [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.
61|
62*/
adminb0dd10f2006-08-25 17:25:49 +000063if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
64{
65 $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder;
66}
67
admin784add72006-10-30 20:24:26 +000068/*
69|---------------------------------------------------------------
70| DEFINE APPLICATION CONSTANTS
71|---------------------------------------------------------------
72|
73| EXT - The file extension. Typically ".php"
74| FCPATH - The full server path to THIS file
75| SELF - The name of THIS file (typically "index.php)
76| BASEPATH - The full server path to the "system" folder
77| APPPATH - The full server path to the "application" folder
78|
79*/
adminb0dd10f2006-08-25 17:25:49 +000080define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
admin1af55492006-09-22 21:43:38 +000081define('FCPATH', __FILE__);
adminb0dd10f2006-08-25 17:25:49 +000082define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
83define('BASEPATH', $system_folder.'/');
admincef21062006-10-30 17:13:13 +000084
admin784add72006-10-30 20:24:26 +000085if (is_dir($application_folder))
admincef21062006-10-30 17:13:13 +000086{
admin784add72006-10-30 20:24:26 +000087 define('APPPATH', $application_folder.'/');
admincef21062006-10-30 17:13:13 +000088}
89else
90{
admin784add72006-10-30 20:24:26 +000091 if ($application_folder == '')
92 {
93 $application_folder = 'application';
94 }
95
admincef21062006-10-30 17:13:13 +000096 define('APPPATH', BASEPATH.$application_folder.'/');
97}
adminb0dd10f2006-08-25 17:25:49 +000098
admin784add72006-10-30 20:24:26 +000099/*
100|---------------------------------------------------------------
101| DEFINE E_STRICT
102|---------------------------------------------------------------
103|
104| Some older versions of PHP don't support the E_STRICT constant
105| so we need to explicitly define it otherwise the Exception class
106| will generate errors.
107|
108*/
109if ( ! defined('E_STRICT'))
110{
111 define('E_STRICT', 2048);
112}
113
114/*
115|---------------------------------------------------------------
116| LOAD THE FRONT CONTROLLER
117|---------------------------------------------------------------
118|
119| And away we go...
120|
121*/
adminb0dd10f2006-08-25 17:25:49 +0000122require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
123?>