Re: [SMARTY] Avoid unnecessary whitespace in compiled templates?
| From: | Jason Sweat | Date: | Sun, 02 Feb 2003 21:51:19 +0000 |
| Subject: | Re: [SMARTY] Avoid unnecessary whitespace in compiled templates? | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7471@lists.php.net to get a copy of this message | ||
Hello Lars,
This probably does not have to do with Smarty directly. Probably one of
your include files has one or more carriage returns before or after the php
tags. Look for
<?php
//the include code
?>\n
\n
\n
That kind of thing will typically generate errors similar to what you are
experiencing.
HTH
Jason
----- Original Message -----
From: "Lars Noschinski" <lars@usenet.noschinski.de>
To: <smarty-general@lists.php.net>
Sent: Sunday, February 02, 2003 2:12 PM
Subject: Re: [SMARTY] Avoid unnecessary whitespace in compiled templates?
> lars@usenet.noschinski.de (Lars Noschinski) writes:
> > messju@lammfellpuschen.de (M Mohr) writes:
> >> On Wed, Jan 29, 2003 at 04:24:16PM +0100, Lars Noschinski wrote:
> >>> I've some templates which call a plugins which does a
> >>> header()-call. But the compiled template contains whitespace which
> >>> prevents sending the header. How can I avoid this?
> >>
> >> you can use output-buffering for that:
> >> http://www.php.net/manual/en/ref.outcontrol.php
> >
> > Oh, right. *sigh* Activate brain before posting ...
>
> Hm, does not work:
>
> ob_start(); $smarty->display($template); ob_end_flush();
> -> Cannot add header information - Headers already sent in $plugin, line
$line.
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>