Skip to Content
Core PHP Programming, Third Edition
book

Core PHP Programming, Third Edition

by Leon Atkinson
August 2003
Intermediate to advanced
1104 pages
19h 27m
English
Pearson
Content preview from Core PHP Programming, Third Edition

7.3. Output Buffering

As stated, the Web server buffers content sent to the browser, and you can request that the buffer be flushed. PHP also includes a mechanism for buffering output you can control completely. Among the output buffering functions described in Chapter 8 are ob_start, ob_end_flush, and ob_end_clean.

When you call the ob_start function, PHP places anything you send to the browser into a buffer. This includes text outside of PHP tags. The Web server does not receive this content until you call the ob_end_flush function. There are several powerful applications of these functions. One is to avoid the problem associated with sending headers. Because PHP sends all headers at once, before any content, you have to take care when using ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming PHP, 3rd Edition

Programming PHP, 3rd Edition

Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre
Programming PHP

Programming PHP

Rasmus Lerdorf, Kevin Tatroe
Programming PHP, 2nd Edition

Programming PHP, 2nd Edition

Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre
Advanced PHP Programming

Advanced PHP Programming

George Schlossnagle

Publisher Resources

ISBN: 0130463469Purchase book