Home >Backend Development >PHP Tutorial >php-Usage of progress bar ob_flush
The
functions in
php can immediately refresh the current cache to the browser, and use this to make a progress bar. <code><span>for</span>( <span>$i</span> = <span>0</span> ; <span>$i</span> < <span>5</span> ; <span>$i</span>++ ) { <span>echo</span> str_pad(<span>''</span>,<span>4096</span>); <span>echo</span><span>$i</span> . <span>'<br />'; ob_flush(); flush(); sleep(<span>1</span>); } </code>
Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the use of php-progress bar ob_flush, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.