Re: [SMARTY] Avoid unnecessary whitespace in compiled templates?
| From: | Lars Noschinski | Date: | Mon, 03 Feb 2003 20:29:08 +0000 |
| Subject: | Re: [SMARTY] Avoid unnecessary whitespace in compiled templates? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7495@lists.php.net to get a copy of this message | ||
sweatjejm@mchsi.com writes:
>> But shouldn't this be covered by output-buffering?
>
> It would, except I think your output buffering was in the wrong place.
> e.g.
> <?php
> include 'file_with_trailing_space.php';
> ..
> ob_start();
> $t->display();
> ..
>
> instead of
> <?php
> ob_start();
> include 'file_with_trailing_space.php';
> ..
> $t->display();...
No, I tried it once again with ob_start() being the first command
after the "<?php" which starts at the first char in the file.
I tried also
<?php
ob_start();
$tmp = $smarty_fetch($page);
header("Location: http://localhost");
ob_end_flush();
?>
and this leads to the same error. So it seems that
> think you can configure PHP to enable output buffering by default in
> the PHP.ini file.
Not an option, as I don't have this possibility on this server.
BTW: After a 'cvs update' all smarty php-files had an newline after the "?>".
Version info: It's PHP 4.2.3 with the newest CVS smarty.