I have a file which is in project folder my wampserver www directory and I want to create a path to this file in my PHP script. I am not sure what is right in accomplishing this as I have seen the use of “./”, “../” and the full root directory of “c:/….” I foresee a situation where the use of C: would restrict the usage of the path to only that local machine and I therefore want to use the wamp’s root which is www.
Share
To get the document root just read it from the $_SERVER-superglobal.