In-depth understanding of ob function buffer mechanism and phpob mechanism in php. The ob function buffer mechanism in php is deeply understood, and the phpob mechanism is deeply understood. the following section describes the ob function buffer
Use PHP to control the use of the user's browser-ob * function. Using PHP to control the user's browser -- ob * function using OutputControl function allows you to freely control the data output in the script. It is very useful, especially for: when
Functions commonly used in OB series functions
Ob_start (); Open an output buffer, and all output information is not sent directly to the browser, but is stored in the output buffer.
Ob_clean (); Deletes the contents of the internal buffer without
key= $key; $this->html (); return Ob_end_clean ();} Public function Get ($key) {$filename = $this->getfilename ($key); if (! $filename | |!file_exists ($filename)) {return false;} Include ($filename); return true;} Public function html () {
PHP cache mechanism Output control detailed, OutputControl
In the php5.2 version of the configuration, the default output_buffering is off, so running the following three lines of code will cause a warning:Warning:cannot Modify header
The output control function gives you the freedom to control the outputs of the data in your script. It is very useful, especially when you want to output a file header after the data has been output. The output control function does not affect the
PHP has a lot of mechanisms, functions, in fact, is the magician, repeated play good, in fact, even simple application, will appear magical effect. Brother Even PHP trainingHere is a ob_start () function.The Ob_start () function is used to open the
PHP implementation of HTML page static method, phphtml page static
As the content of the site increases and user visits increase, it is inevitable that the site will load more and more slowly, limited by the bandwidth and the number of requests
HTML static page generated using PHP implementation, PHP static page
Generates HTML static pages from PHP and stores them in a directory created with the name of the year and month.
Read all data batch generation, all generated after the popup
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.