Click to See Complete Forum and Search --> : flush


susmithp
September 22nd, 2008, 03:39 AM
what is " flush"?

Teranoz
September 22nd, 2008, 05:05 AM
Normally a webserver parses the whole code and than sends the output to the client.
With flush(); you send what you have parsed
Handy for pages with a lot of content.

<?php
blabla code
flush();
blabla more code
flush();
?>

susmithp
September 22nd, 2008, 05:23 AM
thanks ternoz..

so flush and print have same property in some way

PeejAvery
September 22nd, 2008, 08:12 AM
Flush and print are not alike at all. Print() only outputs to the PHP buffers what will be sent to the client-side. The buffer information will only be sent after the server has finished or you flush the buffers.

Note tht flush() only flushes output from PHP. If you want a full webserver flush, you need to use ob_flush() along with flush().

susmithp
September 22nd, 2008, 11:44 PM
thanks for help.

So that means that it is FLUSH(), that sends data to client..
Right?

PeejAvery
September 23rd, 2008, 07:06 AM
Correct.