Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Output buffering in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 90
    Comment on it

    Output buffering is mechanism in which sending a response to the browser . Without output buffering (the default) you HTML is send to the browser in pieces as php script . With output buffering your HTML is store in a variable and send to the browser as one piece at the end of your php script.

    Example :

    1)
        ob_start( );
        phpinfo( );
        $output = ob_get_clean( );
        ob_end_flush();

    2) ob_start( ); echo "Hello World"; if ( $some_error ) { header( "Location: error.php" ); exit( 0 ); }

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: