RE: [PHP] Finding what headers and content were already been sent
| From: | Rasmus Lerdorf | Date: | Fri, 31 May 2002 23:12:47 +0000 |
| Subject: | RE: [PHP] Finding what headers and content were already been sent | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100190@lists.php.net to get a copy of this message | ||
You can loop through $GLOBALS and check for vars that start with "HTTP_",
but yes, you typically know which things you are interested in.
And no, $HTTP_* are only the request headers. For the Apache module
version there is of course also getallheaders()
-Rasmus
On Sat, 1 Jun 2002, Noor Dawod wrote:
> And how do I KNOW which $HTTP_ variables are being set?
> Also, does $HTTP_ACCEPT_LANGUAGE mean that "Accept-Language" command has
> been sent by the browser?
> In my Windows configuration, using CGI version for example, I don't see
> also the headers sent by the server...
>
> Noor
>
>
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus@php.net]
> Sent: ? 01 ???? 2002 00:34
> To: Noor Dawod
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Finding what headers and content were already been
> sent
>
> > By the way, I know that PHP's phpinfo() function lists headers
> received
> > and headers sent, but I couldn't find how can I access them in PHP. In
> > addition, how do I know what content has been sent at any point in a
> > script?
>
> $HTTP_* has them all.
>
> -Rasmus
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>