You are here: Re: what is the header to stop buffering? « PHP Programming Language « IT news, forums, messages
Re: what is the header to stop buffering?

Posted by Petr Vileta on 10/29/06 14:08

"Jerry Stuckle" <jstucklex@attglobal.net> píse v diskusním príspevku
news:AdydnSBDeabyg9nYnZ2dnUVZ_oWdnZ2d@comcast.com...
> laredotornado@zipmail.com wrote:
>> Hi,
>>
>> I'm using PHP 4.4.4. What is the header I need to send in order for
>> output to be continuously sent to the client browser as opposed to it
>> being buffered and all sent at once?
>>
>> Thanks, - Dave
>>
>
> Dave,
>
> There aren't any headers you can send. However, you can cause the data to
> be sent to the browser immediately with:
>
> ob_flush();
> flush();
>
> This will cause PHP to flush the output immediately, and generally Apache
> will do the same. Whether or not it will be displayed immediately,
> however, is up to the browser.
>
And a little trick for browser is to send 1024 or more spaces anywhere where
it is possible in html content.
Example:

<p>some text which should be unbuffered</p>
......1024 spaces here...
<?php ob_flush(); flush(); ?>
<p>another text</p>

--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация