Is there a way to get the absolute path to a file when it is included in another script?
So, I'm trying to include a file that is in folder A when I am in folder B, but it continues to try to link to the location of folder B.
I tried dirname
, $SERVER['PHP_SELF']
, cwd()
, but they still return a relative path.
source share