_autoload中可不可以知道类被哪个文件引用

WBOY
Release: 2016-06-13 11:15:30
Original
827 people have browsed it

__autoload中能否知道类被哪个文件引用
__autoload中能否知道类被哪个文件引用

举例说:
a.php 中有 class a extend base{}
或者 new base()

在__autoload里怎么知道是a.php加载了base?


------解决方案--------------------
你可在 __autoload 中分析 debug_backtrace() 的结果
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template