/ Published in: PHP
If your page has already sent headers to the browser you cant redirect with headers('Location:' . $url);
But you can use the following:
But you can use the following:
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Usage: safe_redirect('http://www.google.com'); * */ function safe_redirect($url){ ?><script> <!-- window.location= "<? echo $url; ?>" //--> </script> <? }