【发布时间】:2013-07-17 22:52:42
【问题描述】:
是否有可能(以有效的方式)检索在另一个(包含的)文件中调用函数的上一个命令的文件名(如果可能,还包括行)?
例如:
Foo.php
function foo() {
bar();
}
Bar.php
function bar() {
// some stuff that will show when the above is executed:
// Foo.php, line 2 (last bit if possible)
}
【问题讨论】:
-
我只知道
__LINE__和__FILE__:(