Re: Time Delay using phpscript
| From: | Justin French | Date: | Mon, 24 Jun 2002 03:17:53 +0000 |
| Subject: | Re: Time Delay using phpscript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103525@lists.php.net to get a copy of this message | ||
Why would you want to do this? All it will achieve is delaying the output
of the entire file to the browser...
If a page would usually take .5 seconds to parse, and you have 10 seconds of
delays in the script, then the browser will get the page in around 10.5
seconds... the user will just see a delay, NOT a page with new things every
few seconds in the already-rendered page.
Once again, PHP is a SERVER SIDE language, and EVERYTHING happens before the
page is sent to the browser. If you want stuff to happen on the CLIENT
SIDE, like displaying a new line every few seconds, then this needs to be
achieved in the BROWSER, with JavaScript or something.
If you View source on a PHP script in your browser, all you'll see is HTML
code... no PHP -- it's all parsed on the server.
Justin French
on 24/06/02 1:14 PM, Uma Shankari T. (umashankari@lantana.tenet.res.in)
wrote:
> I need to display some strings one by one after some specific time..In
> javascript we can use setTimeout() function.Is there any function like
> this in phpscript ???..