On Wed, 01 Feb 2012 18:10:30 -0000, Nestor A Diaz <nes...@tiendalinux.com> wrote:

Hello, i am not sure if this is the supposed behaviour, but suppose i
have the following code inside a template.

<?xml version="1.0" encoding="utf-8"?>

It will render as is, so having a problem regarding the generated PHP
code because the <? ?>

*Parse error*: syntax error, unexpected T_STRING in ...

PHPTAL allows PHP blocks in comments too (perhaps it shouldn't...) and you have short_open_tag enabled in php.ini, which makes all <? ?> blocks, even <?xml ?> interpreted as PHP code.

If you're not using <? blocks for PHP code (and always use <?php ) then you can disable short_open_tag setting.

Otherwise you need to change <?xml to something else or output it using <?php echo '<?xml'; ?>

regards, Kornel Lesiński

PHPTAL mailing list

Reply via email to