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

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
php_tricks [2014/08/07 17:35] juckinsphp_tricks [2015/10/24 22:33] juckins
Line 7: Line 7:
 # The web host \\ # The web host \\
 $host = $_SERVER['HTTP_HOST']; $host = $_SERVER['HTTP_HOST'];
 +
 +# Just the path of the URL without the filename \\
 +$path = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1);
  
 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