i'm trying to display text while a page is loading using a method
similar to the following:
<?
ob_end_flush();
echo 'AAA<br>';
flush();
sleep(10);
echo 'BBB';
?>
in this script, AAA and BBB appear at the same time - when the page has
fully loaded - which is not what i want (i want AAA to appear and then
10 seconds later, BBB to appear). pursuant to the suggestions on
php.net's entry for flush, i've also tried the following to no avail:
<?
echo 'AAA<br>';
ob_flush();
flush();
sleep(10);
echo 'BBB';
?>
any help would be appreciated - thanks!
similar to the following:
<?
ob_end_flush();
echo 'AAA<br>';
flush();
sleep(10);
echo 'BBB';
?>
in this script, AAA and BBB appear at the same time - when the page has
fully loaded - which is not what i want (i want AAA to appear and then
10 seconds later, BBB to appear). pursuant to the suggestions on
php.net's entry for flush, i've also tried the following to no avail:
<?
echo 'AAA<br>';
ob_flush();
flush();
sleep(10);
echo 'BBB';
?>
any help would be appreciated - thanks!
Comment