Home > Backend Development > PHP Tutorial > PHP sets the code to output results while executing_PHP tutorial

PHP sets the code to output results while executing_PHP tutorial

WBOY
Release: 2016-07-21 16:13:22
Original
839 people have browsed it

Copy code The code is as follows:

set_time_limit(10);
ob_end_clean(); // Before looping output, close the output buffer

echo str_pad('',1024);
//The browser will not display the buffered output before accepting the output of a certain length of content. This length value IE is 256, Firefox is 1024
for($i=1;$i<=100;$i++){
echo $i.'
';
flush(); // Flush the output buffer
sleep(1);
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/313506.htmlTechArticleCopy the code as follows: ?php set_time_limit(10); ob_end_clean(); //Before loop output, you need to Close the output buffer echo str_pad('',1024); //The browser is accepting output of a certain length of content...
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