Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Zend framework 如何在Zend中关闭通知抑制?_Zend Framework - Fatal编程技术网

Zend framework 如何在Zend中关闭通知抑制?

Zend framework 如何在Zend中关闭通知抑制?,zend-framework,Zend Framework,Zend正在自动抑制通知,我如何更改此应用程序范围以在出现通知时停止执行 例如,未定义的变量或缺少的参数(导致未定义的变量)将在错误日志中显示通知。如果此通知发生在写入数据库的方法中,则不会写入任何数据,也不会显示任何错误。检查应用程序/configs/application.ini中的PHP错误设置。典型的设置如下: [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 [deve

Zend正在自动抑制通知,我如何更改此应用程序范围以在出现通知时停止执行


例如,未定义的变量或缺少的参数(导致未定义的变量)将在错误日志中显示通知。如果此通知发生在写入数据库的方法中,则不会写入任何数据,也不会显示任何错误。

检查
应用程序/configs/application.ini中的PHP错误设置。典型的设置如下:

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
这意味着在生产模式下隐藏错误,但在开发模式下显示。

确保您处于“开发”模式而不是“生产”模式

检查
public
文件夹中的
index.php

defined('APPLICATION_ENV') || define('APPLICATION_ENV',(getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV'): 'production'));
只需将
production
更改为
development
,因为这将导致从
application/configs/application.ini的development部分读取配置

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

错误显示良好,通知不显示。在这种情况下,请检查php.ini中的错误报告级别。默认情况下,ZF不会更改此设置。我的php.ini中的错误报告级别可以。方法调用中缺少的参数或未定义的变量之类的东西不会触发任何东西。我已经让freenode上的#php人员检查了ini,结果是正确的。错误显示良好,通知显示不正确。我也处于开发模式。嗯,很奇怪!!您是否尝试过输入
错误报告(-1)index.php中的code>?错误报告(0);在index.php一开始就为我工作。