From b0dd10f8171945e0c1f3527dd1e9d18b043e01a7 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 25 Aug 2006 17:25:49 +0000 Subject: Initial Import --- index.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 index.php (limited to 'index.php') diff --git a/index.php b/index.php new file mode 100644 index 000000000..7c910e1e1 --- /dev/null +++ b/index.php @@ -0,0 +1,81 @@ + \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 592cdcbc58963f0cf811aea59db9907943460770 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 22 Sep 2006 18:45:42 +0000 Subject: --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index 7c910e1e1..16084c398 100644 --- a/index.php +++ b/index.php @@ -76,6 +76,7 @@ define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('BASEPATH', $system_folder.'/'); define('APPPATH', BASEPATH.'application/'.$application_folder); +define('FCPATH', __FILE__); require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; ?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 1af5549a6185858e1fce406005cf663355e254a3 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 22 Sep 2006 21:43:38 +0000 Subject: --- index.php | 84 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 43 insertions(+), 41 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 16084c398..267a89889 100644 --- a/index.php +++ b/index.php @@ -1,82 +1,84 @@ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 83b05a860a5f208d15942b517385848cfe4887bb Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 Sep 2006 21:06:46 +0000 Subject: --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 267a89889..7d464dde6 100644 --- a/index.php +++ b/index.php @@ -53,7 +53,7 @@ if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder; } -// Is the aplication variable blank? If so, we'll assume it's called "application" +// Is the $aplication variable blank? If so, we'll assume the folder is called "application" if ($application_folder == '') { $application_folder = 'application'; -- cgit v1.2.3-24-g4f1b From 8f0a8f693307a6d04b8a50aa11f81041c961adf6 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 7 Oct 2006 01:17:25 +0000 Subject: --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7d464dde6..8d7a30252 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,7 @@ | PHP ERROR REPORTING LEVEL |--------------------------------------------------------------- | -| By default CI runs with all error reporting on. For security +| By default CI runs with error reporting set to ALL. For security | reasons you are encouraged to change this when your site goes live. | */ -- cgit v1.2.3-24-g4f1b From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 8d7a30252..0386ed6ed 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,7 @@ error_reporting(E_ALL); |--------------------------------------------------------------- | | This variable must contain the name of your "system" folder. -| Include the path if the folder is not in the same directory +| Include the path if the folder is not in the same directory | as this file. | | NO TRAILING SLASH! @@ -31,7 +31,7 @@ error_reporting(E_ALL); | APPLICATION FOLDER NAME |--------------------------------------------------------------- | -| If you want this front controller to use a different "application" +| If you want this front controller to use a different "application" | folder then the default one you can set its name here. | | NO TRAILING SLASH! @@ -59,7 +59,7 @@ if ($application_folder == '') $application_folder = 'application'; } -// Some versions of PHP don't support the E_STRICT constant so we'll +// Some versions of PHP don't support the E_STRICT constant so we'll // explicitly define it so that it will be available to the Exception class if ( ! defined('E_STRICT')) { @@ -69,7 +69,7 @@ if ( ! defined('E_STRICT')) // Define a few constants that we use througout the framework. // EXT - contains the file extension. Typically ".php" // FCPATH - contains the full server path to THIS file. -// SELF - contains the name of THIS file. +// SELF - contains the name of THIS file. // BASEPATH - contains the full server path to the "system" folder // APPPATH - contains the full server path to the "application" folder -- cgit v1.2.3-24-g4f1b From cef2106de1c7044072499aa5d4e529a01c3db8a4 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 30 Oct 2006 17:13:13 +0000 Subject: --- index.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 0386ed6ed..6c839ec54 100644 --- a/index.php +++ b/index.php @@ -32,7 +32,11 @@ error_reporting(E_ALL); |--------------------------------------------------------------- | | If you want this front controller to use a different "application" -| folder then the default one you can set its name here. +| folder then the default one you can set its name here. +| The folder can also be relocated anywhere on your server. For +| more info please see the user guide: +| http://www.codeigniter.com/user_guide/general/managing_apps.html +| | | NO TRAILING SLASH! | @@ -77,7 +81,15 @@ define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); define('FCPATH', __FILE__); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('BASEPATH', $system_folder.'/'); -define('APPPATH', BASEPATH.$application_folder.'/'); + +if ( ! is_dir($application_folder)) +{ + define($application_folder.'/'); +} +else +{ + define('APPPATH', BASEPATH.$application_folder.'/'); +} // Load the front controller and away we go!.... require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; -- cgit v1.2.3-24-g4f1b From 784add749c806c52327615d47b8c6fabe2bd3438 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 30 Oct 2006 20:24:26 +0000 Subject: --- index.php | 91 +++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 32 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6c839ec54..315b43c8e 100644 --- a/index.php +++ b/index.php @@ -7,9 +7,10 @@ | | By default CI runs with error reporting set to ALL. For security | reasons you are encouraged to change this when your site goes live. +| For more info visit: http://www.php.net/error_reporting | */ -error_reporting(E_ALL); + error_reporting(E_ALL); /* |--------------------------------------------------------------- @@ -23,7 +24,6 @@ error_reporting(E_ALL); | NO TRAILING SLASH! | */ - $system_folder = "system"; /* @@ -32,65 +32,92 @@ error_reporting(E_ALL); |--------------------------------------------------------------- | | If you want this front controller to use a different "application" -| folder then the default one you can set its name here. -| The folder can also be relocated anywhere on your server. For -| more info please see the user guide: +| folder then the default one you can set its name here. The folder +| can also be renamed or relocated anywhere on your server. +| For more info please see the user guide: | http://www.codeigniter.com/user_guide/general/managing_apps.html | | | NO TRAILING SLASH! | */ - $application_folder = "application"; + /* |=============================================================== -| END OF USER CONFIGURABLE SETTINGS +| END OF USER CONFIGURABLE SETTINGS |=============================================================== */ -// Let's attempt to determine the full-server path to the "system" -// folder in order to reduce the possibility of path problems. + +/* +|--------------------------------------------------------------- +| SET THE SERVER PATH +|--------------------------------------------------------------- +| +| Let's attempt to determine the full-server path to the "system" +| folder in order to reduce the possibility of path problems. +| +*/ if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) { $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder; } -// Is the $aplication variable blank? If so, we'll assume the folder is called "application" -if ($application_folder == '') -{ - $application_folder = 'application'; -} - -// Some versions of PHP don't support the E_STRICT constant so we'll -// explicitly define it so that it will be available to the Exception class -if ( ! defined('E_STRICT')) -{ - define('E_STRICT', 2048); -} - -// Define a few constants that we use througout the framework. -// EXT - contains the file extension. Typically ".php" -// FCPATH - contains the full server path to THIS file. -// SELF - contains the name of THIS file. -// BASEPATH - contains the full server path to the "system" folder -// APPPATH - contains the full server path to the "application" folder - +/* +|--------------------------------------------------------------- +| DEFINE APPLICATION CONSTANTS +|--------------------------------------------------------------- +| +| EXT - The file extension. Typically ".php" +| FCPATH - The full server path to THIS file +| SELF - The name of THIS file (typically "index.php) +| BASEPATH - The full server path to the "system" folder +| APPPATH - The full server path to the "application" folder +| +*/ define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); define('FCPATH', __FILE__); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('BASEPATH', $system_folder.'/'); -if ( ! is_dir($application_folder)) +if (is_dir($application_folder)) { - define($application_folder.'/'); + define('APPPATH', $application_folder.'/'); } else { + if ($application_folder == '') + { + $application_folder = 'application'; + } + define('APPPATH', BASEPATH.$application_folder.'/'); } -// Load the front controller and away we go!.... +/* +|--------------------------------------------------------------- +| DEFINE E_STRICT +|--------------------------------------------------------------- +| +| Some older versions of PHP don't support the E_STRICT constant +| so we need to explicitly define it otherwise the Exception class +| will generate errors. +| +*/ +if ( ! defined('E_STRICT')) +{ + define('E_STRICT', 2048); +} + +/* +|--------------------------------------------------------------- +| LOAD THE FRONT CONTROLLER +|--------------------------------------------------------------- +| +| And away we go... +| +*/ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; ?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 09066a4b6421757e8abf76f1d48bdf252bd97e87 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sat, 9 Jun 2007 01:00:06 +0000 Subject: --- index.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 315b43c8e..b7fdfff1d 100644 --- a/index.php +++ b/index.php @@ -58,11 +58,21 @@ | | Let's attempt to determine the full-server path to the "system" | folder in order to reduce the possibility of path problems. +| Note: We only attempt this if the user hasn't specified a +| full server path. | */ -if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) +if (strpos($system_folder, '/') === FALSE) { - $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder; + if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) + { + $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder; + } +} +else +{ + // Swap directory separators to Unix style for consistency + $system_folder = str_replace("\\", "/", $system_folder); } /* -- cgit v1.2.3-24-g4f1b From 268c26c5bc2e218ae4aa3a91cf292e179dab04ed Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sun, 22 Jul 2007 18:14:41 +0000 Subject: --- index.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index b7fdfff1d..9a4d5336a 100644 --- a/index.php +++ b/index.php @@ -44,6 +44,19 @@ $application_folder = "application"; +/* +|--------------------------------------------------------------- +| Dynamic Global Data Assignment +|--------------------------------------------------------------- +| +| If you need any data passed by default to your controllers you +| can use this variable. When a controller class is instantiated +| this data will be passed to the constructor. +| +*/ + $global_data = NULL; + + /* |=============================================================== | END OF USER CONFIGURABLE SETTINGS -- cgit v1.2.3-24-g4f1b From 03717d28b76c0ff3ab30da9d93ebe1a9b8b1be37 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sun, 22 Jul 2007 18:22:22 +0000 Subject: --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 9a4d5336a..7b47d081c 100644 --- a/index.php +++ b/index.php @@ -46,15 +46,15 @@ /* |--------------------------------------------------------------- -| Dynamic Global Data Assignment +| Default Controller Data Assignment |--------------------------------------------------------------- | | If you need any data passed by default to your controllers you | can use this variable. When a controller class is instantiated -| this data will be passed to the constructor. +| this data will be passed to the controller constructor. | */ - $global_data = NULL; + $assign_to_controller = NULL; /* -- cgit v1.2.3-24-g4f1b From 9884449add2bf1a52de10b82a366637b595734fd Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 16 Jan 2008 22:26:37 +0000 Subject: Added Compat.php file --- index.php | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7b47d081c..eb364ec03 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,4 @@ Date: Thu, 17 Jan 2008 23:01:42 +0000 Subject: removed $assign_to_controller - seems redundant all things considered --- index.php | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index eb364ec03..85042d41d 100644 --- a/index.php +++ b/index.php @@ -42,20 +42,6 @@ */ $application_folder = "application"; - -/* -|--------------------------------------------------------------- -| Default Controller Data Assignment -|--------------------------------------------------------------- -| -| If you need any data passed by default to your controllers you -| can use this variable. When a controller class is instantiated -| this data will be passed to the controller constructor. -| -*/ - $assign_to_controller = NULL; - - /* |=============================================================== | END OF USER CONFIGURABLE SETTINGS -- cgit v1.2.3-24-g4f1b From 7a9193afa6d890a91eb3528fa0e62df799b07ed6 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 21 Jan 2008 18:39:20 +0000 Subject: replaced www.codeigniter.com with codeigniter.com --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 85042d41d..ebf696e85 100644 --- a/index.php +++ b/index.php @@ -34,7 +34,7 @@ | folder then the default one you can set its name here. The folder | can also be renamed or relocated anywhere on your server. | For more info please see the user guide: -| http://www.codeigniter.com/user_guide/general/managing_apps.html +| http://codeigniter.com/user_guide/general/managing_apps.html | | | NO TRAILING SLASH! -- cgit v1.2.3-24-g4f1b From 5583e1aae64ff7e902136c4ba610d438dc2015d4 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Sun, 11 May 2008 15:48:20 +0000 Subject: removed closing PHP tag from all framework files --- index.php | 1 - 1 file changed, 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index ebf696e85..9ad29942a 100644 --- a/index.php +++ b/index.php @@ -113,4 +113,3 @@ else | */ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; -?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b From c7deac9f2f9e43cedb18202542e8a46061df046e Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Sun, 11 May 2008 16:27:41 +0000 Subject: Undoing change committed in r1115 --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index 9ad29942a..ebf696e85 100644 --- a/index.php +++ b/index.php @@ -113,3 +113,4 @@ else | */ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; +?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b From a3ffbbb75ab9403941e4f810703313432b3993cc Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Sun, 11 May 2008 18:18:29 +0000 Subject: Removed closing PHP tags, replaced with a comment block identifying the end of the file --- index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index ebf696e85..970f29227 100644 --- a/index.php +++ b/index.php @@ -113,4 +113,6 @@ else | */ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; -?> \ No newline at end of file + +/* End of file index.php */ +/* Location: ./index.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From bc2bfa86bf7125608b7fc190993fafc654cb0da3 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 25 Sep 2008 13:22:15 +0000 Subject: Fixed the spelling of "Dhaka" in the timezone_menu() function of the Date helper. Added a missing quote in an example on the index page --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 970f29227..39aeda5c9 100644 --- a/index.php +++ b/index.php @@ -80,7 +80,7 @@ else | | EXT - The file extension. Typically ".php" | FCPATH - The full server path to THIS file -| SELF - The name of THIS file (typically "index.php) +| SELF - The name of THIS file (typically "index.php") | BASEPATH - The full server path to the "system" folder | APPPATH - The full server path to the "application" folder | -- cgit v1.2.3-24-g4f1b From 85e65f6259d4602f2d3fa81191eb052745e632a7 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Tue, 11 Nov 2008 23:14:42 +0000 Subject: Propset eol-style to CRLF simplified paragraph tag cleanup regex --- index.php | 234 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 117 insertions(+), 117 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 39aeda5c9..de5fdef13 100644 --- a/index.php +++ b/index.php @@ -1,118 +1,118 @@ - Date: Thu, 13 Nov 2008 22:59:24 +0000 Subject: Changing EOL style to LF --- index.php | 234 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 117 insertions(+), 117 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index de5fdef13..39aeda5c9 100644 --- a/index.php +++ b/index.php @@ -1,118 +1,118 @@ - Date: Fri, 6 Mar 2009 22:31:19 +0000 Subject: Removed the "index.php" portion from the FCPATH constant, as it was not needed. --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 39aeda5c9..bac85d9a5 100644 --- a/index.php +++ b/index.php @@ -79,15 +79,15 @@ else |--------------------------------------------------------------- | | EXT - The file extension. Typically ".php" -| FCPATH - The full server path to THIS file | SELF - The name of THIS file (typically "index.php") +| FCPATH - The full server path to THIS file | BASEPATH - The full server path to the "system" folder | APPPATH - The full server path to the "application" folder | */ define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); -define('FCPATH', __FILE__); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); +define('FCPATH', str_replace(SELF, '', __FILE__)); define('BASEPATH', $system_folder.'/'); if (is_dir($application_folder)) -- cgit v1.2.3-24-g4f1b From 15b93ca14fb65565561cc9c38d02dc3df1f8ba07 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 2 Jul 2009 21:23:38 +0000 Subject: changed EXT to always be defined as '.php' to allow the renaming of the index.php file --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index bac85d9a5..d60e79f60 100644 --- a/index.php +++ b/index.php @@ -85,7 +85,7 @@ else | APPPATH - The full server path to the "application" folder | */ -define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); +define('EXT', '.php'); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('FCPATH', str_replace(SELF, '', __FILE__)); define('BASEPATH', $system_folder.'/'); -- cgit v1.2.3-24-g4f1b From 3b890ba7d2509de1ccc3b16ca658c2452ba6e8a0 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 17 Feb 2010 18:13:15 -0600 Subject: test commit whitespace --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index d60e79f60..7852f9ee7 100644 --- a/index.php +++ b/index.php @@ -114,5 +114,6 @@ else */ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; + /* End of file index.php */ /* Location: ./index.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 0c1e405437ceb3c1888e151e6a400653310ad6c1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Tue, 2 Mar 2010 14:31:31 -0600 Subject: updating index.php file --- index.php | 237 +++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 142 insertions(+), 95 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7852f9ee7..0ad8fd823 100644 --- a/index.php +++ b/index.php @@ -1,119 +1,166 @@ Date: Fri, 12 Mar 2010 00:27:51 +0000 Subject: Fixed constant SELF undefined issue when a bad system folder is set. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 0ad8fd823..f27520e72 100644 --- a/index.php +++ b/index.php @@ -113,7 +113,7 @@ // Is the sytsem path correct? if ( ! is_dir($system_path)) { - exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); + exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME)); } /* -- cgit v1.2.3-24-g4f1b From eba35088bd4fef3475ea57ae1b7010aa32c592bb Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 22 Mar 2010 10:43:56 -0500 Subject: fixed spelling in code comment --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index f27520e72..47f1ae9ee 100644 --- a/index.php +++ b/index.php @@ -110,7 +110,7 @@ // ensure there's a trailing slash $system_path = rtrim($system_path, '/').'/'; - // Is the sytsem path correct? + // Is the system path correct? if ( ! is_dir($system_path)) { exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME)); -- cgit v1.2.3-24-g4f1b From 1101602e32c32dcac3fe23b8c43892c3d41a58df Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Thu, 8 Apr 2010 11:29:40 -0500 Subject: Fix #15 - Strict Standards Error in index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 47f1ae9ee..fa34c6514 100644 --- a/index.php +++ b/index.php @@ -134,7 +134,7 @@ define('FCPATH', str_replace(SELF, '', __FILE__)); // Name of the "system folder" - define('SYSDIR', end(explode('/', trim(BASEPATH, '/')))); + define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); // The path to the "application" folder -- cgit v1.2.3-24-g4f1b From 0846d746cfe30f827dd20952a6b492ec4b61de95 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Thu, 8 Apr 2010 11:47:33 -0500 Subject: Update to realpath() check of SYSDIR in index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index fa34c6514..0eef7b895 100644 --- a/index.php +++ b/index.php @@ -102,7 +102,7 @@ * Resolve the system path for increased reliability * --------------------------------------------------------------- */ - if (function_exists('realpath') AND @realpath($system_path) !== FALSE) + if (realpath($system_path) !== FALSE) { $system_path = realpath($system_path).'/'; } -- cgit v1.2.3-24-g4f1b From dd6719738936be31cdaa1758ca86d5eb14dcab3d Mon Sep 17 00:00:00 2001 From: Barry Mieny Date: Mon, 4 Oct 2010 16:33:58 +0200 Subject: Cleanup of stray spaces and tabs --- index.php | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 0eef7b895..6ac782215 100644 --- a/index.php +++ b/index.php @@ -30,7 +30,7 @@ *--------------------------------------------------------------- * * If you want this front controller to use a different "application" - * folder then the default one you can set its name here. The folder + * folder then the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html @@ -46,9 +46,9 @@ * -------------------------------------------------------------------- * * Normally you will set your default controller in the routes.php file. - * You can, however, force a custom routing by hard-coding a + * You can, however, force a custom routing by hard-coding a * specific controller class/function here. For most applications, you - * WILL NOT set your routing here, but it's an option for those + * WILL NOT set your routing here, but it's an option for those * special instances where you might want to override the standard * routing in a specific front controller that shares a common CI installation. * @@ -60,14 +60,14 @@ * Un-comment the $routing array below to use this feature * */ - // The directory name, relative to the "controllers" folder. Leave blank - // if your controller is not in a sub-folder within the "controllers" folder + // The directory name, relative to the "controllers" folder. Leave blank + // if your controller is not in a sub-folder within the "controllers" folder // $routing['directory'] = ''; - + // The controller class file name. Example: Mycontroller.php // $routing['controller'] = ''; - - // The controller function you wish to be called. + + // The controller function you wish to be called. // $routing['function'] = ''; @@ -77,10 +77,10 @@ * ------------------------------------------------------------------- * * The $assign_to_config array below will be passed dynamically to the - * config class when initialized. This allows you to set custom config - * items or override any default config values found in the config.php file. + * config class when initialized. This allows you to set custom config + * items or override any default config values found in the config.php file. * This can be handy as it permits you to share one application between - * multiple front controller files, with each file containing different + * multiple front controller files, with each file containing different * config values. * * Un-comment the $assign_to_config array below to use this feature @@ -106,35 +106,35 @@ { $system_path = realpath($system_path).'/'; } - + // ensure there's a trailing slash $system_path = rtrim($system_path, '/').'/'; // Is the system path correct? if ( ! is_dir($system_path)) { - exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME)); + exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME)); } /* * ------------------------------------------------------------------- * Now that we know the path, set the main path constants * ------------------------------------------------------------------- - */ + */ // The name of THIS file define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); // The PHP file extension define('EXT', '.php'); - // Path to the system folder + // Path to the system folder define('BASEPATH', str_replace("\\", "/", $system_path)); - + // Path to the front controller (this file) define('FCPATH', str_replace(SELF, '', __FILE__)); - + // Name of the "system folder" - define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); + define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); // The path to the "application" folder @@ -143,12 +143,12 @@ define('APPPATH', $application_folder.'/'); } else - { + { if ( ! is_dir(BASEPATH.$application_folder.'/')) { - exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); + exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); } - + define('APPPATH', BASEPATH.$application_folder.'/'); } -- cgit v1.2.3-24-g4f1b From 79bd0363faf287cafd9e9bd5608bc3e08df9ac87 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 6 Oct 2010 10:06:37 -0500 Subject: added suggested value to index.php for error_reporting() when a site goes live, closes #177 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 0eef7b895..c885893dd 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ *--------------------------------------------------------------- * * By default CI runs with error reporting set to ALL. For security - * reasons you are encouraged to change this when your site goes live. + * reasons you are encouraged to change this to 0 when your site goes live. * For more info visit: http://www.php.net/error_reporting * */ -- cgit v1.2.3-24-g4f1b From cee8075e2f8fdeb0d8516b5af8ae7cd7754ac513 Mon Sep 17 00:00:00 2001 From: joelcox Date: Sat, 15 Jan 2011 23:09:47 +0100 Subject: Split basic configuration in three environments, providing fallback to global --- index.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 5bb53d2f2..7eacaab63 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,17 @@ Date: Sun, 16 Jan 2011 15:24:43 +0100 Subject: Removed default error_reporting and set it depending on environment --- index.php | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7eacaab63..016ffc015 100644 --- a/index.php +++ b/index.php @@ -6,24 +6,14 @@ *--------------------------------------------------------------- * * You can load different configurations depending on your - * current environment. The enviroment variable can be set - * to "development" (default), "test" or "production" + * current environment. Setting the environment also influences + * things like logging and error reporting. The enviroment + * variable can be set to "development" (default), + * "test" or "production". * */ define('ENVIRONMENT', 'development'); -/* - *--------------------------------------------------------------- - * PHP ERROR REPORTING LEVEL - *--------------------------------------------------------------- - * - * By default CI runs with error reporting set to ALL. For security - * reasons you are encouraged to change this to 0 when your site goes live. - * For more info visit: http://www.php.net/error_reporting - * - */ - error_reporting(E_ALL); - /* *--------------------------------------------------------------- * SYSTEM FOLDER NAME @@ -106,9 +96,25 @@ // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE // -------------------------------------------------------------------- +/* + * --------------------------------------------------------------- + * Check if environment is set, and set error reporting appropriately + * --------------------------------------------------------------- + */ - - + if (ENVIRONMENT == 'development') + { + error_reporting(E_ALL); + } + elseif (ENVIRONMENT == 'production' OR ENVIRONMENT == 'test') + { + error_reporting(0); + } + else + { + exit("The application environment is not set correctly."); + } + /* * --------------------------------------------------------------- * Resolve the system path for increased reliability -- cgit v1.2.3-24-g4f1b From 1bfd9fabffc47ae7f6efc4704ae3125599004de8 Mon Sep 17 00:00:00 2001 From: joelcox Date: Sun, 16 Jan 2011 18:49:39 +0100 Subject: Set error_reporting to E_ALL when environment unknown and changed CI_Loader to load environment configs first. --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index 016ffc015..7741d5cb8 100644 --- a/index.php +++ b/index.php @@ -112,6 +112,7 @@ } else { + error_reporting(E_ALL); exit("The application environment is not set correctly."); } -- cgit v1.2.3-24-g4f1b From 01d1a5b936556f3b19786b7407cce11cf3bdb616 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Mon, 7 Feb 2011 10:54:06 +0000 Subject: CLI requests can now be run from any folder, not just when CD'ed next to index.php. --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 918c80259..74e3ba32a 100644 --- a/index.php +++ b/index.php @@ -130,6 +130,13 @@ * Resolve the system path for increased reliability * --------------------------------------------------------------- */ + + // Set the current directory correctly for CLI requests + if (defined('STDIN')) + { + chdir(dirname(__FILE__)); + } + if (realpath($system_path) !== FALSE) { $system_path = realpath($system_path).'/'; -- cgit v1.2.3-24-g4f1b From 05fa61144667c85b0463f7e8baa6af00aa195dc6 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 6 Apr 2011 22:57:43 +0100 Subject: Made Environment Support optional. Comment out or delete the constant to stop environment checks. --- index.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 74e3ba32a..6e67c2db5 100644 --- a/index.php +++ b/index.php @@ -28,6 +28,8 @@ * By default development will show errors but testing and live will hide them. */ +if (defined('ENVIRONMENT')) +{ switch (ENVIRONMENT) { case 'development': @@ -42,6 +44,7 @@ default: exit('The application environment is not set correctly.'); } +} /* *--------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 3a746655e92ec59ee7e731c3535673a9aedc5d3e Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Tue, 19 Apr 2011 10:59:47 -0500 Subject: Removing internal references to the EXT constant. Additionally, marked the constant as deprecated. Use ".php" instead. Also adding upgrade notes from 2.0.2 to 2.0.3. --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6e67c2db5..a8d58b2d9 100644 --- a/index.php +++ b/index.php @@ -163,6 +163,7 @@ if (defined('ENVIRONMENT')) define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); // The PHP file extension + // this global constant is deprecated. define('EXT', '.php'); // Path to the system folder @@ -198,7 +199,7 @@ if (defined('ENVIRONMENT')) * And away we go... * */ -require_once BASEPATH.'core/CodeIgniter'.EXT; +require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ /* Location: ./index.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From fc779cef54a5cefc3f0d7f404a408a935d717966 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Wed, 20 Apr 2011 12:25:17 -0500 Subject: Fix #224 Error in primary index.php $routing instructions --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index a8d58b2d9..f4ac11a72 100644 --- a/index.php +++ b/index.php @@ -98,7 +98,7 @@ if (defined('ENVIRONMENT')) // if your controller is not in a sub-folder within the "controllers" folder // $routing['directory'] = ''; - // The controller class file name. Example: Mycontroller.php + // The controller class file name. Example: Mycontroller // $routing['controller'] = ''; // The controller function you wish to be called. -- cgit v1.2.3-24-g4f1b From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- index.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index f4ac11a72..e56de13ed 100644 --- a/index.php +++ b/index.php @@ -11,9 +11,9 @@ * * This can be set to anything, but default usage is: * - * development - * testing - * production + * development + * testing + * production * * NOTE: If you change these, also change the error_reporting() code below * @@ -35,7 +35,7 @@ if (defined('ENVIRONMENT')) case 'development': error_reporting(E_ALL); break; - + case 'testing': case 'production': error_reporting(0); @@ -52,7 +52,7 @@ if (defined('ENVIRONMENT')) *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. - * Include the path if the folder is not in the same directory + * Include the path if the folder is not in the same directory * as this file. * */ @@ -65,7 +65,7 @@ if (defined('ENVIRONMENT')) * * If you want this front controller to use a different "application" * folder then the default one you can set its name here. The folder - * can also be renamed or relocated anywhere on your server. If + * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * @@ -81,24 +81,24 @@ if (defined('ENVIRONMENT')) * * Normally you will set your default controller in the routes.php file. * You can, however, force a custom routing by hard-coding a - * specific controller class/function here. For most applications, you + * specific controller class/function here. For most applications, you * WILL NOT set your routing here, but it's an option for those * special instances where you might want to override the standard * routing in a specific front controller that shares a common CI installation. * - * IMPORTANT: If you set the routing here, NO OTHER controller will be + * IMPORTANT: If you set the routing here, NO OTHER controller will be * callable. In essence, this preference limits your application to ONE - * specific controller. Leave the function name blank if you need + * specific controller. Leave the function name blank if you need * to call functions dynamically via the URI. * * Un-comment the $routing array below to use this feature * */ - // The directory name, relative to the "controllers" folder. Leave blank + // The directory name, relative to the "controllers" folder. Leave blank // if your controller is not in a sub-folder within the "controllers" folder // $routing['directory'] = ''; - // The controller class file name. Example: Mycontroller + // The controller class file name. Example: Mycontroller // $routing['controller'] = ''; // The controller function you wish to be called. @@ -107,7 +107,7 @@ if (defined('ENVIRONMENT')) /* * ------------------------------------------------------------------- - * CUSTOM CONFIG VALUES + * CUSTOM CONFIG VALUES * ------------------------------------------------------------------- * * The $assign_to_config array below will be passed dynamically to the @@ -125,12 +125,12 @@ if (defined('ENVIRONMENT')) // -------------------------------------------------------------------- -// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE +// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE // -------------------------------------------------------------------- /* * --------------------------------------------------------------- - * Resolve the system path for increased reliability + * Resolve the system path for increased reliability * --------------------------------------------------------------- */ @@ -156,7 +156,7 @@ if (defined('ENVIRONMENT')) /* * ------------------------------------------------------------------- - * Now that we know the path, set the main path constants + * Now that we know the path, set the main path constants * ------------------------------------------------------------------- */ // The name of THIS file -- cgit v1.2.3-24-g4f1b From 4b9c62980599228f070b401c7673dce8085b0c61 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:40:48 -0500 Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance --- index.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index e56de13ed..f4ac11a72 100644 --- a/index.php +++ b/index.php @@ -11,9 +11,9 @@ * * This can be set to anything, but default usage is: * - * development - * testing - * production + * development + * testing + * production * * NOTE: If you change these, also change the error_reporting() code below * @@ -35,7 +35,7 @@ if (defined('ENVIRONMENT')) case 'development': error_reporting(E_ALL); break; - + case 'testing': case 'production': error_reporting(0); @@ -52,7 +52,7 @@ if (defined('ENVIRONMENT')) *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. - * Include the path if the folder is not in the same directory + * Include the path if the folder is not in the same directory * as this file. * */ @@ -65,7 +65,7 @@ if (defined('ENVIRONMENT')) * * If you want this front controller to use a different "application" * folder then the default one you can set its name here. The folder - * can also be renamed or relocated anywhere on your server. If + * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * @@ -81,24 +81,24 @@ if (defined('ENVIRONMENT')) * * Normally you will set your default controller in the routes.php file. * You can, however, force a custom routing by hard-coding a - * specific controller class/function here. For most applications, you + * specific controller class/function here. For most applications, you * WILL NOT set your routing here, but it's an option for those * special instances where you might want to override the standard * routing in a specific front controller that shares a common CI installation. * - * IMPORTANT: If you set the routing here, NO OTHER controller will be + * IMPORTANT: If you set the routing here, NO OTHER controller will be * callable. In essence, this preference limits your application to ONE - * specific controller. Leave the function name blank if you need + * specific controller. Leave the function name blank if you need * to call functions dynamically via the URI. * * Un-comment the $routing array below to use this feature * */ - // The directory name, relative to the "controllers" folder. Leave blank + // The directory name, relative to the "controllers" folder. Leave blank // if your controller is not in a sub-folder within the "controllers" folder // $routing['directory'] = ''; - // The controller class file name. Example: Mycontroller + // The controller class file name. Example: Mycontroller // $routing['controller'] = ''; // The controller function you wish to be called. @@ -107,7 +107,7 @@ if (defined('ENVIRONMENT')) /* * ------------------------------------------------------------------- - * CUSTOM CONFIG VALUES + * CUSTOM CONFIG VALUES * ------------------------------------------------------------------- * * The $assign_to_config array below will be passed dynamically to the @@ -125,12 +125,12 @@ if (defined('ENVIRONMENT')) // -------------------------------------------------------------------- -// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE +// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE // -------------------------------------------------------------------- /* * --------------------------------------------------------------- - * Resolve the system path for increased reliability + * Resolve the system path for increased reliability * --------------------------------------------------------------- */ @@ -156,7 +156,7 @@ if (defined('ENVIRONMENT')) /* * ------------------------------------------------------------------- - * Now that we know the path, set the main path constants + * Now that we know the path, set the main path constants * ------------------------------------------------------------------- */ // The name of THIS file -- cgit v1.2.3-24-g4f1b