开发者

How to determine where a require request originated?

开发者 https://www.devze.com 2022-12-14 22:06 出处:网络
Is there any way to determine from within a required script, where that requir开发者_高级运维e call was made from?

Is there any way to determine from within a required script, where that requir开发者_高级运维e 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?


debug_backtrace might help you.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号