Ob_start (); Open buffer
echo \ "Hellon\"; Output
Header ("location:index.php"); redirect the browser to index.php
Ob_end_flush ();//output all content to the browser
by bbs.it-home.org
?>
Copy CodeAll
The output control function gives you the freedom to control the outputs of the data in your script. It is very useful, especially when you want to output a file header after the data has been output. The output control function does not affect the
Php basic function definition constant define (APPCONFIG, plaConfig); get the constant echoconstant (APPCONFIG ). n; echoAPPCONFIG. n; the constant cannot define two initialization variable values: ini_set (display_errors, 1); get the variable value.
Ob_start ([stringoutput_callback])-all output information in the output buffer is not directly sent to the browser, but saved in the output buffer. an optional callback function is used to process output result information. Ob _...
Ob_start
PHP uses the file stream download method (Appendix: solves the problem of garbled characters in the downloaded file content ),. PHP uses the file stream download method (Appendix: solves the problem of garbled characters in the downloaded file
When using PHP, you may need to use the header and setcookie functions. These two functions will send a file header to the browser, however, if you have any output (including empty output, such as space, carriage return, and line feed) before using
I often see people asking on the internet how to make the entire dynamic website static. In fact, the implementation method is very simple.
The code is as follows:
// Add ob_start () to your start ();Ob_start ();// The following is your code//
PHP output control function in simplified and traditional Chinese Conversion Application Overview: This article briefly introduces the PHP output control function and provides specific ideas and examples for its application in simplified and
The buffer control implementation code in PHP. When using PHP, you may need to use the header and setcookie functions. These two functions will send a file header to the browser, however, before using these two functions, you may need to use the
Use PHP's ob_start () to control your browser cache. 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. First, let's take a simple
PHP generates static page analysis templates, caches, and writes files. I. INTRODUCTION in terms of speed, static pages are much faster than dynamic pages, such as php. this is without a doubt, but due to the poor flexibility of static pages, if you
PHP output cache details. 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. First, let's take a simple output control function
Use PHP to generate a static HTML library with high speed. Copy the code as follows: drawing, w +
The code is as follows:
Ob_start (); # enable server cacheInclude_once 'index. php ';$ Ctx = ob_get_contents (); # get cacheOb_end_clean (); # clear
The OutputControl function allows you to control the output of data in the script. It is very useful, especially when you want to output the file header after the data has been output. The output control function does not affect the header
The output control function gives you the freedom to control the outputs of the data in your script. It is very useful, especially when you want to output a file header after the data has been output. The output control function does not affect the
The OutputControl function allows you to control the output of data in the script. It is very useful, especially when you want to output the file header after the data has been output. The Output Control function does not apply header () or
The output control function does not affect the header information sent using header () or Setcookie (), only data blocks that resemble Echo () and PHP code are useful.
Let's start with a simple example that gives you a general impression of the
Php basic function definition constant define (APPCONFIG, plaConfig); get the constant echoconstant (APPCONFIG ). n; echoAPPCONFIG. n; the constant cannot define two initialization variable values: ini_set (display_errors, 1); get the variable value.
Cache is widely used in actual use, which can reduce access to the server database and improve the running speed. Currently, many CMS content management systems frequently use caching mechanisms to improve system operation efficiency. The following
Introduction: This is the PHP basic function of the detailed page, introduced and PHP, related knowledge, skills, experience, and some PHP source code and so on.
class= ' pingjiaf ' frameborder= ' 0 ' src= '
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.