When we do not use CI, we can use error_reporting (E_all); error_reporting (0); This type of code to control the error level. Of course, these statements can be used in classes, but CI itself has a mechanism to control the error level.
You may not always open index.php, but the changes are in this file:
/* *---------------------------------------------------------------* Application Environment *-------------------- -------------------------------------------* * can load different configurations depending on your * current ENVIRONM Ent. Setting the environment also influences * things like logging and error reporting. * * This can being set to anything, but the default usage is: * * development * TESTING * production * * Note:if Change these, also change the error_reporting () code below * */define (' environment ', ' development ');/* *----------------- ----------------------------------------------* ERROR REPORTING *------------------------------------------------ ---------------* * Different environments would require Different levels of error reporting. * By default development would show errors but testing and live would hide them. */if (defined (' environment ')) {switch (Environment) {case ' development ': error_reporting (e_all); Break;case ' testing ': Case ' production ': Error_reportiNg (0); Break;default:exit (' The application environment is not set correctly. ');}}
Environment is to control the error level, the default has three options, development testing production, by the above switch statement control. The code is already clear and can be changed to suit your needs.
http://www.bkjia.com/PHPjc/752348.html www.bkjia.com true http://www.bkjia.com/PHPjc/752348.html techarticle when we do not use CI, we can use Error_reporting (E_all), error_reporting (0); This kind of code to control the error level. Of course, you can also use these statements in your class, but CI ...