Jocka Posted August 14, 2006 Share Posted August 14, 2006 Is there a way to do this in PHP, if there is then I'm not that educated in PHP yet lol. I'm sure it requires JAVASCRIPT too if it is infact possible.I could have swore there was a small tutorial on here somewhere but I couldn't find one.Is there a way to do this. I want to do it for those LONG database searches, so it shows the users "It's almost done" lol. Just something "neat" to look at really. I don't need it but I'd like to have it. Link to comment https://forums.phpfreaks.com/topic/17470-loading-screen-possible/ Share on other sites More sharing options...
zq29 Posted August 14, 2006 Share Posted August 14, 2006 You'll need something like JavaScript for this, maybe even using an Ajax technique. Link to comment https://forums.phpfreaks.com/topic/17470-loading-screen-possible/#findComment-74423 Share on other sites More sharing options...
Jocka Posted August 14, 2006 Author Share Posted August 14, 2006 I'm thinking I can just make it do it set by an "average" load time based on connection speed.. It won't be completely accurate but it'll be close Link to comment https://forums.phpfreaks.com/topic/17470-loading-screen-possible/#findComment-74561 Share on other sites More sharing options...
GingerRobot Posted August 14, 2006 Share Posted August 14, 2006 Well, i *think* you do it using flush()...<?phpfor ($i = 0; $i<10; $i++){echo " Line $i<br />";flush();sleep(1);}echo "Done.";?> Run that and you will notice that it doesn't wait for the script to finish to output the data. So, i believe you can echo things to the browser at strategic points and then use flush().I am using sleep() to simulate a long script here. Link to comment https://forums.phpfreaks.com/topic/17470-loading-screen-possible/#findComment-74711 Share on other sites More sharing options...
ylkien Posted December 6, 2006 Share Posted December 6, 2006 if flush() doesn't work, tryob_flush();flush(); Link to comment https://forums.phpfreaks.com/topic/17470-loading-screen-possible/#findComment-136065 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.