PHP code for executing and outputting results while setting _ PHP Tutorial

Source: Internet
Author: User
PHP sets the code to output results while executing. Copy the code as follows :? Phpset_time_limit (10); ob_end_clean (); before loop output, disable the output buffer echostr_pad (, 1024). The browser accepts a certain length of output content. The code is as follows:


Set_time_limit (10 );
Ob_end_clean (); // disable the output buffer before loop output.

Echo str_pad (', 1024 );
// The browser will not display the buffer output before accepting the output of a certain length. the length value is IE 256, and Firefox is 1024.
For ($ I = 1; $ I <= 100; $ I ++ ){
Echo $ I .'
';
Flush (); // refresh the output buffer
Sleep (1 );
}
?>

The http://www.bkjia.com/PHPjc/313506.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/313506.htmlTechArticle code is as follows :? Php set_time_limit (10); ob_end_clean (); // close the output buffer echo str_pad ('', 1024) before loop output ); // The browser accepts the output of a certain length of content...

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.