PHP ob_flush问题

Is ob_flush necessary and what does it do exactly? I ask because I have at the bottom of my footer and for some reason its not letting me destroy a session variable correctly.

code.

if(isset($_GET['a']) && is_numeric($_GET['a'])) {
    if(isset($_SESSION['page']) && $_SESSION['page'] !== $_GET['a']){
        unset($_SESSION['page']);
    }

    $page = mysqli_real_escape_string($mysqli, htmlentities(strip_tags($_GET['a'])));
    $_SESSION['page'] = $page;
}

if you've used ob_start, then ob_flush will output everything that would normally have been printed out since ob_start was called. Post some code for more detailed help.

ob_start() will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. ob_flush() will output all the content stored in the internal buffer.

Ob_Start() must be used at the beginning of the code and ob_flush() at the end.

It may be used because the user may be trying to redirect to another page and show some message on it.

It may not allow the you to destroy the session because it may be stored in the internal buffer.