$_SERVER['DOCUMENT_ROOT'] and / , difference
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
$_SERVER['DOCUMENT_ROOT'] and / , difference
What is the difference between using $_SERVER['DOCUMENT_ROOT'] and just '/' ?
Re: $_SERVER['DOCUMENT_ROOT'] and / , difference
$_SERVER['DOCUMENT_ROOT'] stores filesystem location where '/' for this specific domain points to. So if you're site resides in /var/www/example.com $_SERVER['DOCUMENT_ROOT'] would give you exactly that, while to access it from browser you would use http://example.com/
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact: