RE: [PHP-WIN] Output Control
| From: | HKG) | Date: | Thu, 27 May 2004 07:05:37 +0000 |
| Subject: | RE: [PHP-WIN] Output Control | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23858@lists.php.net to get a copy of this message | ||
Are you trying to say that flush() does not work properly for you, i.e you
don't see the numbers comming one by one with a seconds delay, but get all
at once?
-----Original Message-----
From: William CANDILLON
To: php-windows@lists.php.net
Sent: 26-5-2004 17:34
Subject: RE: [PHP-WIN] Output Control
I just want to see the numbers before 10 seconds in my browser like in
shell mod.
-----Message d'origine-----
De : Luis Moreira [mailto:luis.moreira@esinnovation.pt]
Envoyé : mercredi 26 mai 2004 17:21
À : William CANDILLON; php-windows@lists.php.net
Objet : Re: [PHP-WIN] Output Control
William CANDILLON wrote:
>I want to execute my script in a browser as with the shell mode.
>
>Example:
>
><?
>
>static $i = 0;
>while ($i < 10) {
>++$i;
>echo "$i\n\n";
>sleep(1);
>}
>
>?>
>
>I've tried this but it's doesn't work :
>
><?
>
>static $i = 0;
>while ($i < 10) {
>++$i;
>echo "$i\n\n";
>flush();
>sleep(1);
>}
>
>?>
>
>
>
What exactly is your problem ?
I tried this and it simply echoes the numbers 1 to 10 in a single line.
If you want to echo them in separate lines, then you need
echo "$i<br>";
Luis
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php