I have a function called showProgressMessage, looks like this:
function showProgressMsg($msg)
{
echo $msg."<br>";
ob_flush();
flush();
usleep(25000);
}
Now, I initialize my scripts like this:
ini_set('output_buffering', 'Off');// delete the 4096k value
ob_start ();
Now, when I call showProgressMessage, i.e.
showProgressMsg("Getting dgdPart.");
it is supposed to immediately be shown in the browser window.
But it is not. It waits until the script is finished before showing
anything on the screen.
I have more than one script using this and one of them works but
the others don’t. I have done exactly the same thing in all the
scripts. What could be the cause of the problem?