Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

PHP - Using Absolute URLs with header() (See related posts)

// Redirects a user to the current domain, the current directory, and the new page. Won't break if you move the scripts to another folder/domain etc.

header ("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/newpage.php");


You need to create an account or log in to post comments to this site.


Related Posts