How does PHP determine what target called it in a method?
滿天的星座
滿天的星座 2017-05-16 13:09:20
0
1
594

1. Just like the title
2. Code

a.php

include(b.php);
b();

b.php

function b(){

   echo 'What calls me is the second line of a.php';
}

The code is as above. How can we determine who called it in b and get the file name and line number

滿天的星座
滿天的星座

reply all(1)
黄舟

debug_backtrace()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template