php – set_error_handler函数不调用autoload
发布时间:2020-12-13 17:02:12 所属栏目:PHP教程 来源:网络整理
导读:我有set_error_handler()函数设置为在出现错误时调用函数. 在该函数中,我有自己的异常类实现: function acs_error_handler($errno,$errstr,$errfile,$errline) { throw new acs_exception($errstr,$errno); } 这给了我以下错误: Fatal error: Class ‘acs_
我有set_error_handler()函数设置为在出现错误时调用函数.
在该函数中,我有自己的异常类实现: function acs_error_handler($errno,$errstr,$errfile,$errline) { throw new acs_exception($errstr,$errno); } 这给了我以下错误:
出于某种原因,此功能不会调用我使用以下设置的自动加载功能: spl_autoload_register('__autoload'); 如果我添加该行: __autoload('acs_exception'); 在错误函数中调用类之前,一切正常. 我的问题是:当我在错误触发函数中调用acs_exception类时,__autoload()函数不应该触发吗? 解决方法
Here’s a related PHP bug report.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |