Okie dokie! getcwd() gets me the current directory of a script. Great.
Now, what if that script was included by another script? It then gets the directory which the parent script is in right? (or does it? Hmm maybe I should check before posting
My question is: How can I have an included file independently determine where it was inlcuded from?
i.e.
files:
Code: Select all
./foo/
parent.php
bar/
./foo/bar/
included_file.php