Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Tutorial News section

In CI, the error reporting level depends on the ENVIRONMENT setting in index.php.
There is a line with this code:
PHP Code:
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); 
This checks for the existence of the $_SERVER['CI_ENV'] superglobal.
If you're not sure about that, you can simply define the ENVIRONMENT constant like this:
PHP Code:
Once you are ready to upload your website to a hosted server (in order to make it available online), you change it to:
PHP Code:
On my computer, I have an index.php and an index_production.php
The first one is using the 'development' environment, the other one 'production'.
When I upload my website, I make sure that on the hosted server, my index_production.php is renamed to index.php.

A bit lower in index.php, you will see a "switch (ENVIRONMENT) {  }" structure.
With that, the correct error reporting level is set, depending on the value of the ENVIRONMENT constant.
The different levels are explained here: http://php.net/manual/en/function.error-reporting.php

Messages In This Thread
RE: CodeIgniter Tutorial News section - by Wouter60 - 08-04-2015, 12:28 AM

Theme © iAndrew 2016 - Forum software by © MyBB