is there any chance that a buffer in output buffer will be supported? supposing u're implementing "send the whole page in html to friends" function. using smarty as email template. if (isset($_GET['send_html_to'])) { ob_start('send_as_html'); } function send_as_html($content) { $tpl = new Smarty("html_email"); prepair_html($content); $tpl->assign($html, $content); $content = $tpl->fetch(); <- this use ob_start to catch all output from the compiled template }
q: why not do "$content = ob_get_clean() and $tpl->fetch() after it" in this case? a: because i can't put ob_get_clean() code in all the php pages. q: but u can do ob_start('send_as_html') in all pages? because i can put it in a common lib that every page include.