I would like to know in PHP how I can find out which is the parent file, in an inclusion, through the child file.
Example:
- avo.php
- pai.php
- hijo.php
In the avo.php
file I have:
include_once 'pai.php';
And in the file pai.php
I have:
#pai.php include_once 'filho.php';
- Through the
filho.php
file, how can I find out that it is included bypai.php
? - How can I find out, by
filho.php
, thatpai.php
is included byavo.php
?