Welcome Guest, Not a member yet? Register   Sign In
Flush output buffer
#1

[eluser]Mat-Moo[/eluser]
I have a routine that does a whole bunch of command line stuff (video conversion, frame ripping), so I'm trying to give feedback to the end user... yet noting comes up till the whole function of the controller finishes.

I'm using
Code:
function _flush()
    {
        // check that buffer is actually set before flushing
        if (ob_get_length()){
            @ob_flush();
            @flush();
            @ob_end_flush();
        }
        @ob_start();
    }

    function convert()
    {
    echo "<p>starting conversion</p>";
        $this->_flush();
        // do stuff
    echo "<p>Grabbing frame</p>";
        $this->_flush();
        // do even more stuff
    echo "<p>Converting to FLV</p>";
        $this->_flush();
        // do even more stuff
    echo "<p>Converting to WMV</p>";
        $this->_flush();
    }
Any clues?




Theme © iAndrew 2016 - Forum software by © MyBB