Re: Finding what headers and content were already been sent
| From: | Rasmus Lerdorf | Date: | Fri, 31 May 2002 22:34:08 +0000 |
| Subject: | Re: Finding what headers and content were already been sent | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100187@lists.php.net to get a copy of this message | ||
> I need to find out, at any point in a PHP script, which headers and what
> content (HTML or other) have been sent already. I know I can use output
> buffering, but in my case, this is not going to work.
You really have no way of knowing since it is the web server that decides
which http headers to ultimately send.
> 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