修改位置:CI根目录 index.php

为开发环境与生产环境定义错误报告级别

 1 if (defined('ENVIRONMENT'))
 2 {
 3     switch (ENVIRONMENT)
 4     {
 5         case 'development':
 6             error_reporting(E_ALL);
 7         break;
 8     
 9         case 'testing':
10         case 'production':
11             error_reporting(E_ERROR);
12         break;
13 
14         default:
15             exit('The application environment is not set correctly.');
16     }
17 }

参考:http://codeigniter.org.cn/user_guide/general/errors.html

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2021-10-22
  • 2022-12-23
  • 2021-06-19
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2022-01-30
  • 2021-12-25
  • 2021-07-30
相关资源
相似解决方案