Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
そのrequire呼び出しがどこから行われたか、requiredスクリプト内から判断する方法はありますか?
したがって、スクリプト B がスクリプト A によって必要とされている場合、スクリプト B 内から、要求を行っているのがスクリプト A であることをどのように判断できますか?
debug_backtraceあなたを助けるかもしれません。
debug_backtrace
scriprBの$_SERVER['PHP_SELF']は、現在のファイルを表示します(スクリプトA)