code igniter extends show_error [英] code igniter extend show_error

查看:117
本文介绍了code igniter extends 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆