Re: ob_flush() problems
| From: | Adam Zey | Date: | Wed, 31 May 2006 19:25:33 +0000 |
| Subject: | Re: ob_flush() problems | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237165@lists.php.net to get a copy of this message | ||
Brad Bonkoski wrote:
cajbecu wrote:That is incorrect. There is nothing stopping a PHP script from doing exactly what he says, and being a server-side script doesn't imply that the data will be buffered. I suggest that both of you examine the contents of http://www.php.net/manual/en/function.flush.php for more information on obstacles to getting data to the client as it is generated. As an unrelated note, there is no point in using "print" for some things and "echo" for others. For your uses, you might as well just use "echo" for everything. Regards, Adam Zey.Hello, for ($i=0; $i < 10; $i++) {PHP is a server side scripting language, so the information would not be sent to the browser( aka client) until the server side script has completed its execution. -Brad$output = "ccc2"; print "<pre>"; echo $output; print "</pre>"; ob_flush(); flush();sleep(1);} I want to show on the browser, "ccc2" (example) every 1 second, but it shows all the text when the for stops... any ideea? i tried all the examples from php.net, all the examples on the net, bot no succes. cheers,