开发者

How to determine where a require request originated?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜