Re: Clearing the PHP Output Buffer
| From: | Andrei Zmievski | Date: | Tue, 18 Apr 2000 13:49:28 +0000 |
| Subject: | Re: Clearing the PHP Output Buffer | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-18014@lists.php.net to get a copy of this message | ||
On Tue, 18 Apr 2000, Faisal Nasim wrote:
> Can I count the number of bytes in the output buffer?
> Or perhaps get a whole copy into a scalar?
$res = ob_get_contents();
strlen($res);
> Am I right that PHP doesn't keep the buffered output,
> but the OS does it for PHP?
No, PHP keeps its own output buffer.
-Andrei
Hacker: Any person who derives joy from
discovering ways to circumvent limitations.