Re: best way to flush stdout?

From: Date: Mon, 21 May 2001 17:28:34 +0000
Subject: Re: best way to flush stdout?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53758@lists.php.net to get a copy of this message
I am not sure that it is the best way to do it but here is my solution: I redirect the page with: header("Location: page1.php); to page1.php which contains a message about the process in progress then after a few moments redirecting to page2.php with javascript: <script> setTimeout("redirect()", 500) function redirect() { window.location = "page2.php" } </script> In this case it redirects in 500msecs, ie half second. Then page2.php done the real job which is MySql query but does not display results or send anything to browser untill query completed. In that case the previous output stays on screen until the query completed. I know that it is not a efficient method but a solution. If anyone knows how to refresh a browser at anytime I will glad to know. And if someone knows if there is a way to refresh only one part of browser (I mean just inside a layer or so..) I really want to know. In that case one can show results as they come from database. It is really good if you have a huge database and searching on multiple tables and/or databases. yours, -- Tolga 'thorr' Orhon "Phil Glatz" <phil@glatz.com> wrote in message news:5.1.0.14.2.20010521100153.03278138@flawless.net... > I have a page that displays a few lines, then runs a database query that > takes five or six seconds. I'd like to flush stdout and display the first > text while the query is running, so the user doesn't think the site is > down. What's the best way to accomplish this? thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#53758) next »