note 108111 deleted from function.header by tularis
| From: | tularis@php.net | Date: | Fri, 04 Apr 2014 11:16:19 +0000 |
| Subject: | note 108111 deleted from function.header by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-199126@lists.php.net to get a copy of this message | ||
Note Submitter: Yousha dot A at Mail dot com
----
Safe redirect:
<?php
function Redirect($Str_Location, $Bln_Replace = 1, $Int_HRC = NULL)
{
if(!headers_sent())
{
header('location: ' . urldecode($Str_Location), $Bln_Replace, $Int_HRC);
exit;
}
exit('<meta http-equiv="refresh" content="0; url=' .
urldecode($Str_Location) . '"/>'); # |
exit('<script>document.location.href=' . urldecode($Str_Location) .
';</script>');
return;
}
?>