Return to Snippet

Revision: 7138
at July 9, 2008 16:50 by midniteslayr


Initial Code
$location = 'http://'.$_SERVER['SERVER_NAME'].implode("/", explode("/", $_SERVER['PHP_SELF'], -1)).'/';

Initial URL

                                

Initial Description
This allows you to format the URL to go to the directory where the file is placed. Very useful if you are wanting to write server independent PHP Apps.

Initial Title
Format URL to go to the same directory

Initial Tags

                                

Initial Language
PHP