开发者

Does set_error_handler() work on most cheap virtual webspace hosting accounts?

开发者 https://www.devze.com 2022-12-14 18:13 出处:网络
I\'d like to use set_error_handler() to handle all PHP errors in one place, but I\'m afraid that this is something开发者_如何学C I can\'t use with cheap webspace hosters. Or must I not worry much abou

I'd like to use set_error_handler() to handle all PHP errors in one place, but I'm afraid that this is something开发者_如何学C I can't use with cheap webspace hosters. Or must I not worry much about that?


PHP allows to disable functions with the disable_functions directive. But I don’t see any reason for why anyone would not allow set_error_handler.


set_error_handler is just a normal function of PHP -- so it should work on any hosting service.

I really don't see any reason that would justify for a hosting service to disable that function -- and I've never seen it disabled.


set_error_handler() is part of the core PHP error handling functions, so it should work on any host.

There isn't a way to disable it that I know of, although setting the error_reporting level to 0 would make it so the handler was never called. This is something you have complete control over however.

0

精彩评论

暂无评论...
验证码 换一张
取 消