Created
February 22, 2016 17:11
-
-
Save casperwilkes/c8d74dbf7d56f4038270 to your computer and use it in GitHub Desktop.
Simple redirect function for php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Redirection header. | |
* @param string $location Where to send user to. | |
*/ | |
function redirect($location = NULL) { | |
if ($location != NULL) { | |
header("Location: {$location}"); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment