README.md
December 4, 2022 ยท View on GitHub
Description
You know how everyone tells you to use header to redirect, you probably know by now that this only works if headers haven't already been sent. Well this way it works everytime without any errors.
More Info
You should put this in a seperate file (Eg: functions.php) and include it in your scripts or just simple put the print part in your script.
| Submitted On | |
| By | Marc 'InSp3KtaH' Giroux |
| Level | Beginner |
| User Rating | 4.5 (18 globes from 4 users) |
| Compatibility | PHP 3.0, PHP 4.0 |
| Category | Internet/ Browsers/ HTML |
| World | PHP |
| Archive File |
API Declarations
Use It Freely!
Source Code
<?
function redirect($url) {
die('<meta http-equiv="refresh" content="0;URL='.$url.'">');
}
?>