i have the following PHP File Structure:
dir0
dirA
dirA.1
dirA.1.1
fileA.php : dirname(__FILE__).'/docs';
dirA.2
...
dirB
fileB.php: include_once("../dirA/dirA.1/dirA.1.1/fileA.php");
dirC
fileC.php: include_once("../dirA/dirA.1/dirA.1.1/fileA.php");
in the included fileA.php i use dirname(__FILE__)
.
i get the currect path if i call the function of fileA.php directly. BUT i get the wrong path if i call it (after include) in fileB.php and fileC.php, ...etc!
how can i get the directory of the included file?
NOTE: the name of dir0(root) may change, so i don't want to use static Strings for these paths!