& Lt ;? Php initializes sessionsession_start (); adds the urlrewrite value output_add_rewrite_var (& amp; 39; var & amp; 39;, & amp; 39; value & amp; 39 ;); insert a Connection echo & amp;
- // Initialize the session
- Session_start ();
- // Add the url rewrite value
- Output_add_rewrite_var ('Var ', 'value ');
- // Insert a connection
- Echo 'link ';
- // Send the buffer data
- Ob_flush ();
- // Reset the url rewrite value
- Output_reset_rewrite_vars ();
- // Insert a connection
- Echo 'link ';
- /*
- */
- Print_r (ob_list_handlers (); // lists the output handles used and outputs the default output handler.
- Ob_end_flush (); // send the buffer data and disable the buffer.
- Ob_start ("ob_gzhandler"); // open the buffer and use ob_gzhandler
- Print_r (ob_list_handlers (); // list the output handle.
- Ob_end_flush (); // send the buffer data and disable the buffer.
- Ob_start (create_function ('$ string', 'return $ string;'); // open the buffer
- Print_r (ob_list_handlers (); // lists the output handles used and outputs the default output handler.
- Ob_end_flush (); // send the buffer data and disable the buffer.
- /*
- */
- If (ob_get_level () = 0) // judge the buffer level. if no active buffer is available
- Ob_start (); // open the buffer
- For ($ I = 0; $ I <10; $ I ++) // executes the operation cyclically.
- {
- Echo"
Line to show. "; // Output Content
- Echo str_pad ('', 4096)." n "; // output the generated string
- Ob_flush (); // sends the buffer data
- Flush (); // refresh the buffer
- Sleep (1); // pause for 1 second
- }
- Echo "done."; // Mark the output operation
- Ob_end_flush (); // sends the buffer data and closes the buffer.
- ?>