469,889 Members | 1,465 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

ob_start, callback and chunk_size


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?

Feb 1 '06 #1
0 1198

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.