Re: sleep() & flush()
| From: | Andy Hoffman | Date: | Fri, 25 Aug 2000 13:38:53 +0000 |
| Subject: | Re: sleep() & flush() | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2143@lists.php.net to get a copy of this message | ||
1193-639-1 wrote:
> this snip will not work: nor with 3.0.16 or 4.0.2 dev
> not online nor local!
> what's wrong eh?
> <?
> $t="This is a silly text!\n<br>";
> print $t;
> flush();flush();flush();flush(); //nothing happens! not even you send
> thausands of flush()
> sleep(25); //after 25 seconds you'll see both lines
> at once
> echo $t;
> ?>
Maybe try breaking your code up with some straight HTML text in between... just
a hunch, really. PHP most likely is running the print line, but isn't taking a
break to REALLY do the flush, before it goes to sleep. Give it something else
to chew on in the meantime :)
<?php
$t="Some Text";
print $t;
flush();
?>
<p>Some HTML straight text</p>
<?php
sleep(25);
echo $t;
?>
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
email: andy.hoffman@bms.com