The difference between flush(), ob_flush(), and ob_end_flush() in php

WBOY
Release: 2016-07-25 09:05:42
Original
929 people have browsed it
  1. //Prevent browser caching
  2. echo str_repeat(" ",1024);
  3. for($i=0;$i<5;$i++){
  4. echo $i;
  5. sleep(1);
  6. flush();//It will output a number every 1s. If you use ob_flush(), it will wait for 5s to output together
  7. }
  8. ?>
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template