Danny620 Posted August 30, 2009 Share Posted August 30, 2009 need help i used the sleep() function to pause the exction on the script but it seems to just pause the reload time on the page what i would like is it to print first message on access of page then in 3 more seconds print anthor and so on is there some other function that can do this and not just slow the page load down Link to comment https://forums.phpfreaks.com/topic/172459-sleep/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 30, 2009 Share Posted August 30, 2009 It's not a problem with sleep(), it is a problem in that web servers and browsers are not designed to output and render content from one HTTP request the way you are attempting. See this link - http://www.phpfreaks.com/forums/index.php/topic,267240.msg1260532.html#msg1260532 Once you satisfy all the conditions mentioned in the information posted in that link, you might get this to work with your current server/browser but when try it on another server/browser combination you will find that it probably won't work and since you need administrative access to the web server to turn off some of the settings that prevent it from working, sooner or later you won't be on a server where you can ever get it to work. To do what you are attempting requires using AJAX to make periodic HTTP requests to the server to get and update the information being displayed on the page. Link to comment https://forums.phpfreaks.com/topic/172459-sleep/#findComment-909217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.