Name

ob_start

Synopsis

bool ob_start([string callback [, int chunk [, bool erase ]]] )

Turns on output buffering, which causes all output to be accumulated in a buffer instead of being sent directly to the browser. If callback is specified, it is a function (called before sending the output buffer to the client) that can modify the data in any way; the ob_gzhandler() function is provided to compress the output buffer in a client-aware manner. The chunk option can be used to trigger the flushing of the buffer when the buffer size equals the chunk number. If the erase option is set to false, then the buffer will not be deleted until the end of the script. See Chapter 13 for more information on using the output buffer.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.