arkleyjoe Posted August 20, 2009 Share Posted August 20, 2009 Hi, I am designing a routine that handles a bulk upload of files and assosiated data from either xml or CSV. due to the number of files (maybe 1000) it take a long time to execute. Rather than we have to wait until my script has fully executed before I get feedback on what has happened can I make the script give me feed back to the screen following the conpletetion of each loop? I hope that makes sense? Joe Link to comment https://forums.phpfreaks.com/topic/171141-script-that-takes-a-long-time-to-execute/ Share on other sites More sharing options...
Maq Posted August 20, 2009 Share Posted August 20, 2009 Rather than we have to wait until my script has fully executed before I get feedback on what has happened can I make the script give me feed back to the screen following the conpletetion of each loop? Sure, why not? Link to comment https://forums.phpfreaks.com/topic/171141-script-that-takes-a-long-time-to-execute/#findComment-902521 Share on other sites More sharing options...
arkleyjoe Posted August 20, 2009 Author Share Posted August 20, 2009 Can you help me under stand how? If I echo something to the screen link " file uploaded " it will wait until the script completes before displaying this?? Link to comment https://forums.phpfreaks.com/topic/171141-script-that-takes-a-long-time-to-execute/#findComment-902531 Share on other sites More sharing options...
corbin Posted August 20, 2009 Share Posted August 20, 2009 Disable output buffering. ob_flush(); At the top of the script should do it. Or perhaps: while(ob_flush()); Link to comment https://forums.phpfreaks.com/topic/171141-script-that-takes-a-long-time-to-execute/#findComment-902806 Share on other sites More sharing options...
Daniel0 Posted August 20, 2009 Share Posted August 20, 2009 flush Link to comment https://forums.phpfreaks.com/topic/171141-script-that-takes-a-long-time-to-execute/#findComment-902812 Share on other sites More sharing options...
corbin Posted August 20, 2009 Share Posted August 20, 2009 Oooo never knew there was a function that caused the environment PHP was running under to flush too (or requests it anyway). Guess that makes sense . Link to comment https://forums.phpfreaks.com/topic/171141-script-that-takes-a-long-time-to-execute/#findComment-902912 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.