Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 2.x - Echo output as script is working
#1

(This post was last modified: 12-20-2022, 12:03 AM by MurbiesWalto.)

I was trying to get codeigniter to output text as the script was working but couldn't get it to work. I have search on here and google and seen using ob_end_flush(); and flush(); and also along with adding more bytes so the browser can output. But none of that is working in CI 2.x. If anyone has had luck with this, thanks in advance


I have tried

function test()
{
    ob_end_flush();
        echo "test1";
    ob_start();
    sleep(3);
    ob_end_flush();
        echo "test1";
    ob_start();
    sleep(3);
    ob_end_flush();
        echo "test1";
    ob_start();
}
With no luck. The script waits 6 seconds then spits everything out at once. I would like it to echo the output to the screen then wait 3 seconds then output the next echo echatspin echatrandom then wait another 3 seconds etc.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB