You are here: ob_start, callback and chunk_size « PHP Programming Language « IT news, forums, messages
ob_start, callback and chunk_size

Posted by Thomas Mlynarczyk on 02/01/06 23:37

Hi,

I want to process the output of a script line by line before sending it out.

I thought, ob_start() with a callback function would do the job if the
callback function was called for every line. According to the manual, this
should be possible: (quote) "If the optional parameter chunk_size is passed,
the callback function is called on every first newline after chunk_size
bytes of output."

The way I understand this, if I set chunk_size to 0, the function should be
called for every newline. However, it turns out that this parameter must be
at least 2 in order to work. Why? Even more problematic is that my callback
does in fact not get called for every newline, but only once per "echo".
Why? I'm running PHP 4.3 using Maguma Studio, in other words, without an
HTTP server. Could that be the reason?

Greetings,
Thomas

 

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

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