blob: 6c839ec545c7d24bc623dd61f4e6784ff219e833 [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.
10|
11*/
adminb0dd10f2006-08-25 17:25:49 +000012error_reporting(E_ALL);
13
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*/
26
27 $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"
admincef21062006-10-30 17:13:13 +000035| folder then the default one you can set its name here.
36| The folder can also be relocated anywhere on your server. For
37| more info please see the user guide:
38| 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*/
44
admin1af55492006-09-22 21:43:38 +000045 $application_folder = "application";
adminb0dd10f2006-08-25 17:25:49 +000046
47/*
admin1af55492006-09-22 21:43:38 +000048|===============================================================
49| END OF USER CONFIGURABLE SETTINGS
50|===============================================================
adminb0dd10f2006-08-25 17:25:49 +000051*/
52
admin1af55492006-09-22 21:43:38 +000053// Let's attempt to determine the full-server path to the "system"
54// folder in order to reduce the possibility of path problems.
adminb0dd10f2006-08-25 17:25:49 +000055if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
56{
57 $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder;
58}
59
admin83b05a82006-09-25 21:06:46 +000060// Is the $aplication variable blank? If so, we'll assume the folder is called "application"
admin1af55492006-09-22 21:43:38 +000061if ($application_folder == '')
adminb0dd10f2006-08-25 17:25:49 +000062{
admin1af55492006-09-22 21:43:38 +000063 $application_folder = 'application';
adminb0dd10f2006-08-25 17:25:49 +000064}
65
admine334c472006-10-21 19:44:22 +000066// Some versions of PHP don't support the E_STRICT constant so we'll
admin1af55492006-09-22 21:43:38 +000067// explicitly define it so that it will be available to the Exception class
adminb0dd10f2006-08-25 17:25:49 +000068if ( ! defined('E_STRICT'))
69{
70 define('E_STRICT', 2048);
71}
72
admin1af55492006-09-22 21:43:38 +000073// Define a few constants that we use througout the framework.
74// EXT - contains the file extension. Typically ".php"
75// FCPATH - contains the full server path to THIS file.
admine334c472006-10-21 19:44:22 +000076// SELF - contains the name of THIS file.
admin1af55492006-09-22 21:43:38 +000077// BASEPATH - contains the full server path to the "system" folder
78// APPPATH - contains the full server path to the "application" folder
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
85if ( ! is_dir($application_folder))
86{
87 define($application_folder.'/');
88}
89else
90{
91 define('APPPATH', BASEPATH.$application_folder.'/');
92}
adminb0dd10f2006-08-25 17:25:49 +000093
admin1af55492006-09-22 21:43:38 +000094// Load the front controller and away we go!....
adminb0dd10f2006-08-25 17:25:49 +000095require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
96?>