note 59529 added to function.header
| From: | nachojt at infotorre dot com dot ar | Date: | Fri, 09 Dec 2005 05:21:26 +0000 |
| Subject: | note 59529 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99796@lists.php.net to get a copy of this message | ||
Another way to correct te problem if you get this message: "Warning: Cannot modify header
information - headers already sent by ...." is using the HTML redirection insted of javascript.
In that case, you don't have to worry about the browser, if it is running javascript or if it
isn't.
To replace this:
<?php header ("Location: file.php"); ?>
you can use this:
<?php echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3;
URL=\"file.php\">"; ?>
NOTE: "CONTENT" is just the time you want the meta-tag wait before redirects.
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59529
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59529&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59529&report=yes
Search -- http://master.php.net/manage/user-notes.php