how to use ob_start?

Posted by user187580 on Stack Overflow See other posts from Stack Overflow or by user187580
Published on 2010-04-21T15:21:03Z Indexed on 2010/04/21 15:23 UTC
Read the original article Hit count: 366

Filed under:
|
|

Hello

I am using PHPSavant templating system for a project and I am not sure how to use ob_start in this.

I have tried before .. for example,

page_header.php
-- ob_start();

page_footer.php
-- ob_end_flush();

But because now I am using a templating system.. am not sure where to put these function.

$template = new Savant3();
$template->some_var = $some_value;
$template->display('default_template');

the default_template contains all of and populate section using some variables (set to $template object). Should I be using ob_start and ob_end_flush where my html code is or to include on each and every php file which calls to this template?

Any ideas? thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about ob-start