开发者

Set custom error levels in zend framework

How can I set custom error levels with Zend Framework - say, I want to disable E_NO开发者_开发知识库TICE.

Thanks.


If you are using Zend_Application put the following line into your application.ini

phpsettings.error_reporting = E_ALL & ~E_NOTICE

You can also use error_reporting() in your bootstrap like so:

error_reporting(E_ALL & ~E_NOTICE);

The error reporting levels a documented in the PHP manual.


In application.ini, this works:

phpSettings.error_reporting = E_ALL^E_NOTICE

This won't work:

phpSettings.error_reporting = "E_ALL^E_NOTICE"


ZF 1.11, application.ini.

This works:

phpSettings.error_reporting = E_ALL ^ E_NOTICE

This won't work:

phpSettings.error_reporting = E_ALL^E_NOTICE
phpSettings.error_reporting = "E_ALL^E_NOTICE"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜