note 20387 added to function.header
| From: | antyqjon at wp dot pl | Date: | Tue, 02 Apr 2002 09:31:54 +0000 |
| Subject: | note 20387 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28495@lists.php.net to get a copy of this message | ||
When header() is used as the redirect (with Location: ), headers cannot be sent after sending
anything to client (this could be changed, but... don't care :)) You may use my function
redirecting between sites with no mercy for headers ;). It's based not only on PHP.
function redirect ($url)
{
echo '<SCRIPT TYPE="javascript">';
printf("window.location.href='%s'",$url);
echo '</SCRIPT>';
exit;
}
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+20387
http://master.php.net/manage/user-notes.php?action=delete+20387
http://master.php.net/manage/user-notes.php?action=reject+20387