php gets the web page file and path:
echo $_SERVER[’DOCUMENT_ROOT’]."
"; //Get the server document root variable
echo $_SERVER[’PHP_SELF’]."
"; //Variable that obtains the absolute path of the file server that executes the code
echo __FILE__."
"; //Variable to obtain the file system absolute path of the file
echo dirname(__FILE__); //Function to get the folder path where the file is located
php gets the current url:
$url_this = "http://".$_SERVER [’HTTP_HOST’].$_SERVER[’PHP_SELF’];