gpt4 book ai didi

php - zend 中的错误 Controller 如何工作

转载 作者:行者123 更新时间:2023-12-03 23:05:57 24 4
gpt4 key购买 nike

我只是想知道错误 Controller 如何在 zend 框架中为不同的模块工作,比如它的管理模块和默认模块...因为它在默认模块中工作正常,但在管理模块中不起作用...

有什么我必须使用的条件吗?以及如何?

最佳答案

如果您正在使用自定义错误处理程序(如果没有,您可能很快就会使用),您需要将其注册到前端 Controller :

$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array(
'module' => 'error',
'controller' => 'error',
'action' => 'error'
)));

这意味着您有一个模块、一个 Controller 和一个操作,所有这些都称为“错误”。如果您还没有自定义错误 Controller ,请在 google 上搜索或通读 http://www.thedeveloperday.com/custom-profiler-for-live-environments/

关于php - zend 中的错误 Controller 如何工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3245255/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com