Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


php_tricks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
php_tricks [2014/08/07 17:31] – created juckinsphp_tricks [2014/08/07 17:35] juckins
Line 1: Line 1:
-# the entire URL of the current page, including query string +# the entire URL of the current page, including query string \\
 $url = $_SERVER['REQUEST_URI'];  $url = $_SERVER['REQUEST_URI']; 
  
-# the base URL of the current page without query string+# the base URL of the current page without query string \\ 
 +$url_base = $_SERVER['PHP_SELF'];
  
-$url_base = $_SERVER['PHP_SELF'];+# The web host \\ 
 +$host = $_SERVER['HTTP_HOST'];
  
 More info on parsing the URL: http://php.net/manual/en/function.parse-url.php  More info on parsing the URL: http://php.net/manual/en/function.parse-url.php 
php_tricks.txt · Last modified: 2018/11/01 21:32 by juckins