比如D:\test\file.php中调用了call(),call中如何能知道是D:\test\file.php调用了它?
D:\test\file.php
call()
call
只能用debug_backtrace():
debug_backtrace()
function whatever() { $t = debug_backtrace(); echo "called from {$t[0]['file']}"; }
标签
查看
385 次