summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-22 23:43:38 +0200
committeradmin <devnull@localhost>2006-09-22 23:43:38 +0200
commit1af5549a6185858e1fce406005cf663355e254a3 (patch)
tree33f8a08ba540443bda2789becdd8773bff33f970
parentdbd8aec6121f1d0a295031c268964357ebcc84e0 (diff)
-rw-r--r--index.php84
1 files changed, 43 insertions, 41 deletions
diff --git a/index.php b/index.php
index 16084c398..267a89889 100644
--- a/index.php
+++ b/index.php
@@ -1,82 +1,84 @@
<?php
+/*
+|---------------------------------------------------------------
+| PHP ERROR REPORTING LEVEL
+|---------------------------------------------------------------
+|
+| By default CI runs with all error reporting on. For security
+| reasons you are encouraged to change this when your site goes live.
+|
+*/
error_reporting(E_ALL);
/*
-|------------------------------------------------
+|---------------------------------------------------------------
| SYSTEM FOLDER NAME
-|------------------------------------------------
+|---------------------------------------------------------------
+|
+| This variable must contain the name of your "system" folder.
+| Include the path if the folder is not in the same directory
+| as this file.
+|
+| NO TRAILING SLASH!
|
-| This variable must contain the name of your "system"
-| folder. Include the path if the folder is not in the same
-| directory as this file. No trailing slash
*/
$system_folder = "system";
/*
-|------------------------------------------------
+|---------------------------------------------------------------
| APPLICATION FOLDER NAME
-|------------------------------------------------
+|---------------------------------------------------------------
|
-| If you want this front controller to use a specific
-| "application" folder you can set its name here.
-| By doing so you can have multiple applications share
-| a common set of Code Igniter system files.
-| Note: It is assumed that your application folder will
-| be located within the main system/application folder.
-| For example, lets say you have two applications,
-| "foo" and "bar":
+| If you want this front controller to use a different "application"
+| folder then the default one you can set its name here.
|
-| system/application/foo/
-| system/application/foo/config/
-| system/application/foo/controllers/
-| system/application/foo/errors/
-| system/application/foo/scripts/
-| system/application/foo/views/
-| system/application/bar/
-| system/application/bar/config/
-| system/application/bar/controllers/
-| system/application/bar/errors/
-| system/application/bar/scripts/
-| system/application/bar/views/
-|
-| If you would like to use the "foo" application you'll
-| set the variable like this:
-|
-| $application_folder = "foo";
+| NO TRAILING SLASH!
|
*/
- $application_folder = "";
+ $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.
if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
{
$system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder;
}
-if ($application_folder != '')
+// Is the aplication variable blank? If so, we'll assume it's called "application"
+if ($application_folder == '')
{
- $application_folder .= '/';
+ $application_folder = 'application';
}
-// Older versions of PHP don't support this so we'll explicitly define it
+// 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('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
+define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');
-define('APPPATH', BASEPATH.'application/'.$application_folder);
-define('FCPATH', __FILE__);
+define('APPPATH', BASEPATH.$application_folder.'/');
+// Load the front controller and away we go!....
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
?> \ No newline at end of file