";
//Return complete web path and filename of currently executing script:
echo "PHP_SELF: " . $_SERVER['PHP_SELF'] . "
";
//Returns the Host header from the current request
echo "HTTP_HOST: " . $_SERVER['HTTP_HOST'] . "
";
//Return complete web path of web page from which resource has been requested
echo "HTTP_REFERER: " . $_SERVER['HTTP_REFERER'] . "
";
//Return system path: /path_to_account/account/public_html
echo "CONTEXT_DOCUMENT_ROOT: " . $_SERVER['CONTEXT_DOCUMENT_ROOT'] . "
";
//Return system path: /var/www/html
echo "DOCUMENT_ROOT: " . $_SERVER['DOCUMENT_ROOT'] . "
";
//Return web path: /~account
echo "CONTEXT_PREFIX: " . $_SERVER['CONTEXT_PREFIX'] . "
";
//Return full web request path, including query string
echo "REQUEST_URI: " . $_SERVER['REQUEST_URI'] . "
";
//Return full web path of the current script
echo "SCRIPT_NAME: " . $_SERVER['SCRIPT_NAME'] . "
";
//Return request method used to access the page (such as GET or POST)
echo "REQUEST_METHOD: " . $_SERVER['REQUEST_METHOD'] . "
";
//Return query string if query string present
echo "QUERY_STRING: " . $_SERVER['QUERY_STRING'] . "
";
//Absolute pathname of the currently executing script
echo "SCRIPT_FILENAME: " . $_SERVER['SCRIPT_FILENAME'] . "
";
echo "";
/*
//Some additional $_SERVER values you may wish to try ...
$_SERVER['HTTPS'] Is the page being served via https
$_SERVER['GATEWAY_INTERFACE'] Returns the version of the Common Gateway Interface (CGI) the server is using
$_SERVER['SERVER_ADDR'] Returns the IP address of the host server
$_SERVER['SERVER_NAME'] Returns the name of the host server (such as www.w3schools.com)
$_SERVER['SERVER_SOFTWARE'] Returns the server identification string (such as Apache/2.2.24)
$_SERVER['SERVER_PROTOCOL'] Returns the name and revision of the information protocol (such as HTTP/1.1)
$_SERVER['REQUEST_TIME'] Returns the timestamp of the start of the request (such as 1377687496)
$_SERVER['HTTP_ACCEPT'] Returns the Accept header from the current request
$_SERVER['HTTP_ACCEPT_CHARSET'] Returns the Accept_Charset header from the current request (such as utf-8,ISO-8859-1)
$_SERVER['REMOTE_ADDR'] Returns the IP address from where the user is viewing the current page
$_SERVER['REMOTE_HOST'] Returns the Host name from where the user is viewing the current page
$_SERVER['REMOTE_PORT'] Returns the port being used on the user's machine to communicate with the web server
$_SERVER['SERVER_ADMIN'] Returns the value given to the SERVER_ADMIN directive in the web server configuration file (if your script runs on a virtual host, it will be the value defined for that virtual host) (such as someone@w3schools.com)
$_SERVER['SERVER_PORT'] Returns the port on the server machine being used by the web server for communication (such as 80)
$_SERVER['SERVER_SIGNATURE'] Returns the server version and virtual host name which are added to server-generated pages
*/
?>