O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required