Output Buffering
IT Notes → PHP @ December 22, 2020
- Advantages: Headers and cookies can be sent at any point of time, compression and reordering of output buffers.
- Can use php.ini for to enable output buffering for all scripts.
- ob_start(), ob_end_flush( ), ob_end_clean( ), ob_flush( ).
and ob_clean() .Tthe clean variants just empty the buffer, whereas functions, print what’s in it. Additionally end variants turn off output buffering. - Read output buffer through ob_get_contents( ).
- flush().
- ob_start(“ob_gzhandler”) For compression using gzip library. Almost 90% compression is made possible.
- output_a dd_rewrite_var(‘param’, value’) and output_reset_rewrite_vars( ) For URL Rewrite.
Subscribe
Login
0 Comments