X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=user_guide%2Fgeneral%2Fenvironments.html;fp=user_guide%2Fgeneral%2Fenvironments.html;h=175a1531e776bff103792cb5d546e4ed7fddbf0c;hb=6d8f5b56b237767344bc4a283b4093e6d6f1a612;hp=0000000000000000000000000000000000000000;hpb=0f67329ebdddeb59a2b6b79aedb1fce421378ca8;p=living-lab-site.git diff --git a/user_guide/general/environments.html b/user_guide/general/environments.html new file mode 100755 index 0000000..175a153 --- /dev/null +++ b/user_guide/general/environments.html @@ -0,0 +1,126 @@ + + + + + +Handling Multiple Environments : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

CodeIgniter User Guide Version 2.0.2

+
+ + + + + + + + + +
+ + +
+ + + +
+ +

Handling Multiple Environments

+ +

+ Developers often desire different system behavior depending on whether + an application is running in a development or production + environment. For example, verbose error output is something that would + be useful while developing an application, but it may also pose a security issue when "live". +

+ +

The ENVIRONMENT Constant

+ +

+ By default, CodeIgniter comes with the environment constant set to + 'development'. At the top of index.php, you will see: +

+ + +define('ENVIRONMENT', 'development'); + + +

+ In addition to affecting some basic framework behavior (see the next section), + you may use this constant in your own development to differentiate + between which environment you are running in. +

+ +

Effects On Default Framework Behavior

+ +

+ There are some places in the CodeIgniter system where the ENVIRONMENT + constant is used. This section describes how default framework behavior is + affected. +

+ +

Error Reporting

+ +

+ Setting the ENVIRONMENT constant to a value of 'development' will + cause all PHP errors to be rendered to the browser when they occur. Conversely, + setting the constant to 'production' will disable all error output. Disabling + error reporting in production is a good security practice. +

+ +

Configuration Files

+ +

+ Optionally, you can have CodeIgniter load environment-specific + configuration files. This may be useful for managing things like differing API keys + across multiple environments. This is described in more detail in the + environment section of the Config Class documentation. +

+ +
+ + + + + + + \ No newline at end of file