PatPHP Posted February 21, 2009 Share Posted February 21, 2009 Hi How can i get a live output instead of running the code first and show everything rendered at the end? Quote Link to comment https://forums.phpfreaks.com/topic/146255-solved-live-output/ Share on other sites More sharing options...
PatPHP Posted February 21, 2009 Author Share Posted February 21, 2009 Strange... it does it now... after a while. Sorry thread can be closed. Quote Link to comment https://forums.phpfreaks.com/topic/146255-solved-live-output/#findComment-767800 Share on other sites More sharing options...
.josh Posted February 21, 2009 Share Posted February 21, 2009 You can't make php show "live output." The script always gets parsed and then output is sent. There are a couple of ways you can approximate "live output" though, with ob_flush or with ajax Quote Link to comment https://forums.phpfreaks.com/topic/146255-solved-live-output/#findComment-767802 Share on other sites More sharing options...
PatPHP Posted February 22, 2009 Author Share Posted February 22, 2009 @Crayon Violent That is interesting what you say. But it actually does give live output. I have a loop and in that loop an echo. It will give me the output on my browser. But it will just show me the output after 30-50 seconds regularly. I haven't figured it out yet why this is the case. Quote Link to comment https://forums.phpfreaks.com/topic/146255-solved-live-output/#findComment-768292 Share on other sites More sharing options...
PFMaBiSmAd Posted February 22, 2009 Share Posted February 22, 2009 It's because php, the web server, and the browser all can do buffering, compression, and minimum-length block transfers. Output that is delayed and comes in blocks 30-50 seconds late is not output in real time/live. Quote Link to comment https://forums.phpfreaks.com/topic/146255-solved-live-output/#findComment-768429 Share on other sites More sharing options...
ShivaGupta Posted September 30, 2013 Share Posted September 30, 2013 for($k = 0; $k < 80000; $k++) echo ' '; // extra spaces to fill up browser buffer Quote Link to comment https://forums.phpfreaks.com/topic/146255-solved-live-output/#findComment-1451944 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.