code igniter extend show_error

我的未来我决定 提交于 2020-01-15 03:49:11

问题


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?


回答1:


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.

Update:
You should extent CI_Exceptions rather then modifying in-place.



来源:https://stackoverflow.com/questions/6125551/code-igniter-extend-show-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!