chiprivers Posted March 18, 2007 Share Posted March 18, 2007 Is there a way that I can have my script send information to the display as it is obtained rather than waiting for the whole script to process? I am running a script that proceeses quite a large amount of entries in a database and I would like it to display each row as it is processed rather than waiting until it is complete and then displaying it all at the same time. Link to comment https://forums.phpfreaks.com/topic/43210-progressive-script/ Share on other sites More sharing options...
JasonLewis Posted March 18, 2007 Share Posted March 18, 2007 php is server-side, so it happens before outputted. but you could use ajax i think. Link to comment https://forums.phpfreaks.com/topic/43210-progressive-script/#findComment-209797 Share on other sites More sharing options...
jokur Posted March 18, 2007 Share Posted March 18, 2007 You can use flush() after each line you would like to display immediately, or alternatively use ob_implicit_flush(1) at the top of your script in order to display data as soon as it is echo'd. flush()ing doesn't work well on Windows/IIS though. Link to comment https://forums.phpfreaks.com/topic/43210-progressive-script/#findComment-209817 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.