RE: [SMARTY] Output buffering?
| From: | Monte Ohrt | Date: | Tue, 04 Mar 2003 21:27:51 +0000 |
| Subject: | RE: [SMARTY] Output buffering? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8405@lists.php.net to get a copy of this message | ||
IMHO, never in Smarty. Output buffering is outside its role. You can
handle your output buffering several ways. Some that come to mind:
1) php.ini -> enable it by default
2) do it in your PHP application
3) Apache mod_gzip
#2 is probably the only choice for those without server administration
access. #3 is my personal favorite because it is 100% transparent and
works on any data from the web server whether it's static, PHP, Perl,
etc. ... just one more thing your application doesn't have to deal with.
Monte
On Tue, 2003-03-04 at 07:33, Peter Billen wrote:
> I have always been wondering, and this is maybe the exact moment to ask:
> why and in what cases would you do output buffering?
>
> Peter
>
> -----Original Message-----
> From: Hinrich Donner [mailto:hd@tiro.de]
> Sent: dinsdag 4 maart 2003 14:17
> To: smarty-general@lists.php.net
> Subject: Re: [SMARTY] Output buffering?
>
> Hi,
>
> include 'Smarty.class.php';
> ob_start('ob_gzhandler');
> $smarty =& new Smarty();
> $smarty->Display('my.tpl');
> $output = ob_get_contents();
> ob_end_clean();
>
> echo $output;
>
> On Tuesday 04 March 2003 14:01, James Burrows wrote:
>
> > Hi there,
> >
> > Is it possible to perform output buffering using smarty? I'd like to
> gzip
> > my output before sending it to the browser.
> >
> > Thanks,
> > James
>
> --
> Hinrich Donner
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Monte Ohrt <monte@ispi.net>