For example, if I'm running a script at /home/user/www/domain.com/addresses/addresses.php, I need some sort of variable that returns the following:
/home/user/www/domain.com/addresses
Code: Select all
$_SERVERї'PHP_SELF']; //This returns the script name, not the root dir of the script
$_SERVERї'DOCUMENT_ROOT']; //this returns the root of the domain, not the root of the current script
$_SERVERї'SCRIPT_NAME']; //This returns the script name
$_SERVERї'PATH_TRANSLATED']; //This returns the full server path, including the script