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!)

About this user

Bon http://moi.st/ure/

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

PHP - Using Absolute URLs with header()

// 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");

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed