I know this is a simple script that probably everyone already know, but I would like to keep it as a reminder for myself and everyone out there who doesn't know about it yet. For some reason, there are times when we need to know the full path of our web directory.
So, let's say you installed zen cart on your web root directory. Generally, you will have something like httpdocs/includes as one of your installation folder. If someone asks you, what's the full path of that folder ?
echo $_SERVER['DOCUMENT_ROOT'];
The script above once executed will print out the full path of your current directory location. That alone should do it.
Recent comments