1 2 3 4 5 6
Ob_start,flush,ob_flush for ($i =0; $i 10; $i + +) {echo $i. '‘; Flush (); Sleep (1); }
A friend of the PHP cache output control function must be familiar with the above code, it would like to achieve the effect is 1
Note You need to restart the Apache service line after modifying PHP.ini!
for ($i =0; $i '; Flush (); Sleep (1);}
A friend of the PHP cache output control function must be familiar with the above code, it would like to achieve the effect is 1
PHP programs are buffered, regardless of the circumstances in which PHP executes (CGI, Web servers, etc.). This function sends all the output of the program so far to the user's browser.
The flush () function does not affect the caching mode of the
PHP programs are buffered, regardless of the circumstances in which PHP executes (CGI, Web servers, etc.). This function sends all the output of the program so far to the user's browser.The flush () function does not affect the caching mode of the
The descriptions of ob_flushflush in the manual are to refresh the output buffer and must be used together, which may lead to confusion.
Ob_flush/flush descriptions in the manual are used to refresh the output buffer and must be used together, which
Ob_flush/flush descriptions in the manual are used to refresh the output buffer and must be used together, which may lead to many confusion...
In fact, they have different operation objects. In some cases, flush does nothing at all ..
Ob _ * series
Ob_flush/flush in the manual description, are refreshing output buffer, and also need to support the use, so will lead to a lot of people confused ...
In fact, they are different objects of operation, in some cases, flush do not do anything at
The flush () function is invalid? The output cannot be refreshed in real time. how can this problem be solved? This post was last edited by zhoumengkang at 13:46:14
The test code is as follows:
The following procedure is I found on the Internet, he commented that the first sentence is very critical, but I found that the first sentence did not work, no output 300 spaces. And I deleted the first sentence. The result is exactly the same.
The description of ob_flushflush in the manual is to refresh the output buffer and must be used together. Therefore, many people may be confused that the description of ob_flush/flush in the manual is to refresh the output buffer, it also needs to
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.