RE: [PHP4BETA] Header() in PHP4
| From: | Samuel Liddicott | Date: | Wed, 25 Aug 1999 08:01:05 +0000 |
| Subject: | RE: [PHP4BETA] Header() in PHP4 | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3705@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Michael Stearne [mailto:MStearne@eisolutions.com]
> Sent: 25 August 1999 07:19 AM
> To: zeev@zend.com
> Cc: php4beta@lists.php.net
> Subject: Re: [PHP4BETA] Header() in PHP4
>
>
>
>
> Zeev Suraski wrote:
> >
> > Compiling the script prior to executing it has little to do with this
> > functionality, because header() is called in runtime (it's affected by
> > control structures such as if statements).
> > However, PHP 4.0 is equipped with an output abstraction layer, that
> > supports output buffering. Among other things, it means it's
> supported in
> > PHP 4.0.
>
> It is possible to support, or it is supported?
>
> The header() function may be ambigious. I am talking more of a
> location() function which changes to the location specified at once.
As you know PHP4 allows buffering of output so that you can send headers
partway through.
So you could define your own location function:
function location($location) {
header("Location $location");
exit;
}
I hope exit will quit the whole php (like it does for sh); then you would
get what you want.
Sam