Yasuo Ohgaki wrote: > > If you really need to call ob_end_clean() (i.e. delete buffer) inside > ob_start() call back, we can do that as follows, > > Set flag before calling callback function. > If flag is set and one of buffer deletion function is called > inside callback function, then set flag for deleting the buffer. > Check deletion flag and if it's set, delete the buffer. > > It's easy to fix and has a little additional overhead. > > Any comments? >
Come up with better idea. Since you are inside callback function. You can just return "" null string to buffer to erase it. This way works with current code also. Any objections disallowing calling ob_*() function from callback functions? -- Yasuo Ohgaki -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php