tells the PHP processor to redirect all output to an internal cache (buffer). No output will be sent to the browser until ob_start is called.
This function returns the "output buffer" as a string. You can call this function to send the accumulated output to the browser. (Only after turning off the buffering function!!)
Returns the length of the string in the cache.
Clear the output cache and turn the output cache off. This function must be used before the content in the cache is output to the browser. void 501([int flag]) Used to turn on/off the implicit flush action switch (default is off). If flush is turned on, every time print/echo or other output commands are called, the output content will be immediately sent to the browser. Use output controls to compress PHP output You must use the Zlib extension package compiled in PHP4 to compress the output. If necessary, you can view the installation instructions for the Zlib package in the PHP documentation. First, initialize the output cache:
, use print, echo, or other methods you like to generate all output content ,For example:
After the page is generated, we get back the output content:
, you must check whether the browser supports compressed data. If supported, the browser will send an ACCEPT-ENCODEING HTTP header to the server. We only need to check if there is a "gzip,deflate" string in the $HTTP_ACCEPT_ENCODING variable.
This method is simple to use and clearly structured. 1 2 Next Page Last Page |