Before you ob_start(), don’t forget ob_flush() and ob_end_clean()…

Adding compression to your PHP scripts is as easy as:

// start at the beginning of your output.
output will be here, whatever it is.
// and after your output.

No, really. It is that easy.

Author: Mike on September 9, 2011
Category: PHP, Tutorials
Tags: , , ,

Comments are closed.

Last articles