阅读背景:

如何让set_error_handler()调用对象上的方法?

来源:互联网 

I think about using the set_error_handler() functionality in PHP to handle most of the PHP errors in one place (logging them to a file). From the documentation it looks like if I can pass a function name to set_error_handler(). Nice! But I have an ErrorManager object which has a nice logging method. I want to use that ErrorManager object and write an special error handler method for it, and have set_error_handler call that ErrorManager. I think about using the set_error_handler() fun




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: