2014-11-22 80 views

回答

0

查看项目根目录中的index.php。如果您打算为生产环境设置它(即禁用错误报告),则将环境设置为生产环境。

define('ENVIRONMENT', 'production'); 

您也可以进行更改的error_reporting设置自己在同一个文件

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.'); 
    } 
} 
+0

感谢您的回复,可能我要替换的,而不是使用error_reporting(E_ALL)代码; – 2014-11-22 08:33:25

+0

'error_reporting(0);'禁用错误 http://php.net/manual/en/function.error-reporting.php – turntwo 2014-11-22 08:34:35

+0

它不工作我 – 2014-11-22 08:46:26