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

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

 if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break; case 'testing':
case 'production':
error_reporting(E_ERROR);
break; default:
exit('The application environment is not set correctly.');
}
}

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

05-08 15:31