zoukankan      html  css  js  c++  java
  • ci 框架 报错级别 调整

    最近在研究CI框架,ci框架的报错级别控制文件 在根目录下的index.php中

    在大约29行 附近 有个

     1 /*
     2  *---------------------------------------------------------------
     3  * APPLICATION ENVIRONMENT
     4  *---------------------------------------------------------------
     5  *
     6  * You can load different configurations depending on your
     7  * current environment. Setting the environment also influences
     8  * things like logging and error reporting.
     9  *
    10  * This can be set to anything, but default usage is:
    11  *
    12  *     development
    13  *     testing
    14  *     production
    15  *
    16  * NOTE: If you change these, also change the error_reporting() code below
    17  *
    18  */
    19     define('ENVIRONMENT', 'development');

    ENVIRONMENT 就是来控制报错级别的,默认的有三个选项,development  testing production,由下面的语句控制

    /*
     *---------------------------------------------------------------
     * ERROR REPORTING
     *---------------------------------------------------------------
     *
     * Different environments will require different levels of error reporting.
     * By default development will show errors but testing and live will 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.');
    	}
    }
    

     自己可以根据需求进行相应更改

     

  • 相关阅读:
    <<剪绳子>>题解
    P5743 小猴吃桃 题解
    注意C++中的int与long long 的乘法
    数组初始化方法总结
    一维差分和二维差分
    一维前缀和与二维前缀和
    例2-6 字母转换
    例1-11 评测机队列
    golang ---查找字串实例 IP address
    mongodb ---加减等操作
  • 原文地址:https://www.cnblogs.com/molang/p/2523458.html
Copyright © 2011-2022 走看看