Re: clear headers desire : redirect
| From: | Brian Clark | Date: | Sat, 16 Dec 2000 10:41:12 +0000 |
| Subject: | Re: clear headers desire : redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30655@lists.php.net to get a copy of this message | ||
Hello Philip,
(PO == "Philip Olson") philip@theprojects.org writes:
PO> I would love a way to do this :
PO>
PO> print 'oh my, i exist!';
PO>
PO> if (headers_set()) {
PO>
PO> headers_clear('ALL');
PO> }
PO>
PO> header("Location: http://www.example.com/"óºz>ÏÁ
PO> ´•ù�À•);
PO> exit;
Not gonna work because you've already printed something to the
browser. When it gets down to the header() call it's going barf out a
nice error message.
PO> Where headers_clear() clears headers so in a sense, use
PO> header("Location:...) as a redirect. Is this silly? Maybe
PO> a 'TRIM' option would be useful too ;-)
-Brian
--
It is easier to write an incorrect program
than understand a correct one.