Re: [SMARTY] Smarty Bug... at least

From: Date: Thu, 31 Oct 2002 16:43:33 +0000
Subject: Re: [SMARTY] Smarty Bug... at least
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6296@lists.php.net to get a copy of this message
On Thu, Oct 31, 2002 at 05:05:32PM +0100, Manuel Polo wrote: > Scott Matthewman wrote: > > >>-----Original Message----- > >>From: M Mohr [mailto:messju@lammfellpuschen.de] > >> > >>hello, > >> > >>On Thu, Oct 31, 2002 at 12:29:33PM +0100, Manuel Polo wrote: > >> > >> > >>>Hi! > >>> > >>><?xml version="1.0" encoding="{$pag_encoding}"?> > >>> > >>>This fails... at least on my configuration and latest Smarty (v2.3) > >>> > >>> > >>short_open_tag=off in your php.ini may help. > >> > >> > >I'm using Smarty 2.3.0 on PHP 4.2.2 with the short_open_tag setting on, > >and > >haven't experienced this problem when using XML templates. > > > >It's possible that the MIME type is not being interpreted correctly. > >Issuing > >a header("Content-type: text/xml"); line before outputting your text may > >be > >of benefit. > > > >Scott > > > > > > > > I think that the mime of this document is not relevant at all.. did that > line work really on your config?? > > Lets see: > > This line works withing a smarty template (first line of course): > > <?xml version="1.0" encoding="UTF"?> > > But this doesn´t: > > <?xml version="1.0" encoding="{$foo}"?> > > It generates a parse error on compiled template: > > *Parse error*: parse error in > */home...../includes/smarty/templates_c/%%851/%%851085415/header.xhtml.php* > on line 1 and that line (btw it would have helped if you posted that line) looks something like: <?xml version="1.0" encoding="<?php echo $this->_tpl_vars['foo']; ?>"?> ^^^^^ ^^^^^ this causes trouble. again: i can reproduce your bug with short_open_tag= On, but it goes away with short_open_tag=Off. > So I think about a bug... yes, a little one. literal '<?' in templates shout be replaced by something like '<'<?php echo '?'; ?> or so. have fun messju > -- > > Manuel Polo Tolón > > Dpto. I+D > Servicios de Telefonía Avanzada > Juan De la Cierva #23 > 50014 Zaragoza > Tlf. +034 902 11 12 21

« previous php.smarty.general (#6296) next »