...or use flush() just before that piece of code, if that's the case (if you don't need its output to complete the page). The page will be sent, the browser will remain in the "page in progress" state until the whole script is done, but that shouldn't bother your users, since they have the whole page to look at by that time.

Bogdan

John W. Holmes wrote:

DougD wrote:

I have a page with a particular PHP section that takes quite a time to load.
Is there a way I can delay that script to run after everything else has
loaded. I suppose it may need to use Javascript????


You could use register_shutdown_function() to execute the code, providing you don't need any output sent to the browser. Do some testing as to whether PHP still waits for that function to finish or not, but I don't think it does.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to