submitted by: ignatz

PHP: get current page URL

Often used for form actions, the variable $PHP_SELF has changed with recent versions, and now must be accessed using the _SERVER array of pre-defined variables.


code snippet:
<? 
// in earlier versions, this was accessed via $PHP_SELF
echo $_SERVER["PHP_SELF"]

?>