Questions about ob output

Source: Internet
Author: User
Ob output & lt ;? Phpob_start (); echo & nbsp; str_repeat ("& nbsp;", 4098); for ($ I = 65; $ I & lt; 70; $ I ++) {echo & nbsp; chr ($ I); ob_flush (); flush about ob output

ob_start();
echo str_repeat(" ",4098);
for($i=65;$i<70;$i++){
echo chr($i);
ob_flush();
flush();
sleep(1);
}
?>


The above code is normal in IE and FF, and ABCDE can be output in sequence, but it cannot be displayed in Google's browser in sequence, but it outputs ABCDE at a time, I thought it was because Google's cache was too large and str_repeat was increased to 9000. why?
------ Solution --------------------
I don't know, what is the 360 speed kernel?

This type of output is boring. I used to only know that it is related to the server, but now it is related to the browser.
It can be seen that success becomes a small probability event.
There is no practical value, so you don't have to focus on it.


------ Solution --------------------
if (ob_get_level() == 0) ob_start();

for ($i = 0; $i<10; $i++){

echo "
 Line to show.";
//echo str_pad('1',4096)."\n";
echo str_repeat("1",4098);
ob_flush();
flush();
sleep(2);
}

echo "Done.";

ob_end_flush();

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.