CodeIgniter Forums

Full Version: Output generated html code before end of script execution
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Is it possible to output the so far generated html code with CodeIgniter? When I load a slow script now I don't see anything in my browser until the script is completely done.

For example take the default controller:
function index()
    // Code to output all the html generated above
    echo("script is done loading");

How do I make sure my browser already gets to see the welcome message before the 10 second sleep kicks in?

Is it even possible?

El Forum


And read up on php's native buffering functions.

El Forum

Thanks. But I actually have read that but I still don't get how to send the entire buffer to the browser. I also tried all of the following but none of them worked:

Can anyone give me some clarification on this subject, as I really don't know where to start looking.

El Forum

It makes sense to post your code.