tags:

views:

30

answers:

2

Is there any way to determine from within a required script, where that require call was made from?

So if Script B is required by Script A. How can I determine from within Script B that it is Script A who is making the request?

+2  A: 

debug_backtrace might help you.

Ciarán Walsh
Ah, I should have thought of this. Thank you! :)
Spot
+1  A: 

a $_SERVER['PHP_SELF'] in scripr B, will show the current file (script A)

gmaurol
Ah, this is very good to know. Thank you!
Spot