note 52655 deleted from function.header by sp
| From: | sp@php.net | Date: | Sun, 03 Jul 2005 13:54:23 +0000 |
| Subject: | note 52655 deleted from function.header by sp | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91360@lists.php.net to get a copy of this message | ||
Note Submitter: wil1488 at gmail dot com
----
vernonj
said abolt the problem:
'Warning: Cannot modify header information - headers already sent by'
and the solution is use:
<? echo "<script> self.location(\"file.php\");</script>"; ?>
i think the better method is use:
<?
print("<script
type="text/javascript">window.location=\"file.php\"</script>");
?>
// i use print, but echo works great! :)
i tested this method to redirect on Opera and Internet Explorer, maybe works on all browsers!
This method of redirect with javascript i found on: http://www.w3schools.com/js/tryit.asp?filename=tryjs_crossbrowser
Thanks !