Introduction to new functions of PHP4-output information control functions, previously forwarded by others

Source: Internet
Author: User
Introduction to new functions of PHP4-output information control functions these functions allow you to control the content output by your script. it can be used in many different situations, especially when your script has output information, you need to send a new file header. the output control function does not use header () or setcookie () to send SyntaxHighlighter. all ();

Introduction to new functions of PHP4-output information control functions these functions allow you to control the content output by your script. it can be used in many different situations, especially when your script has output information, you need to send a new file header. the output control function does not affect the header information sent using header () or setcookie (). it only applies to data blocks similar to echo () and PHP code. example 1. control Output In the preceding example, the output content using echo () is saved in the output buffer until ob_end_flush () is called (). it makes sense that the content that calls setcookie () is successfully stored in the cookie without causing errors. (normally, you cannot send the file header information to your browser after the data has been sent .) related function header () and setcookie (). flush-refresh the content stored in the output buffer zone in the Korea data list will be sent to the browser ob_start-open the output buffer so that all output information is not directly sent to the browser, instead, it is saved in the output buffer ob_get_contents-the content of the output buffer is returned. if you want to process the output content in the future, you can call this function to reserve a backup ob_get_length-return the content length of the output buffer ob_end_flush-end (SEND) the content of the output buffer, disable the output buffer ob_end_clean-delete (discard) the content of the output buffer, close the output buffer if your program finds that there is a problem with the output content, you can discard all the output content, which can prevent leakage of some secret information ob_implicit_flush-open or close the refresh to open it directly, every script output is directly sent to the browser, and you no longer need to call 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.