code igniter extends show_error [英] code igniter extend show_error
问题描述
我为我的php执行实现了一个回滚机制,如果一个错误发生,它会弹出一个堆栈和撤消动作。
I implemented a rollback mechanism for my php execution so if an error occurs it will pop a stack and undo actions. How can I add this hook so my function is called anytime show_error is used?
推荐答案
实际上没有这样的钩子可用。你可以使用show_error
根据您的要求修改CI_Exceptions类(File:system / libraries / Exceptions.php)中的函数show_error()。
Actually there is no such hook available.You need to hack it.
Modify the function "show_error()" in CI_Exceptions class (File: system/libraries/Exceptions.php) as per your Requirement.
这应该是开头的参考。
This should be a reference to start with.
更新:
您应该对CI_Exceptions进行扩展,而不是原地修改。
Update:
You should extent CI_Exceptions rather then modifying in-place.
这篇关于code igniter extends show_error的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!