Code Comments
Programming Forum and web based access to our favorite programming groups.Rainer,
Thanks - that did the trick.
In the first line of my xml.tpl file, I put {header} and the first thing
assigned to smarty instance was:
$smarty->assign('header', header("Content-type: application/xml"));
Great!
Cheers
George
> -----Original Message-----
> From: Rainer Müller [mailto:mueller_rainer@gmx.de]
> Sent: 4 December 2004 12:11 pm
> To: George Pitcher
> Subject: Re: [SMARTY] Displaying xml
>
>
> George Pitcher wrote:
> can do this
>
> You have to send it as application/xml instead of the default text/html.
>
> <?php
> header("Content-type: application/xml");
> ?>
>
> You have to use this before any output is done.
>
> Rainer
>
Post Follow-up to this messageGeorge Pitcher wrote:
> Rainer,
>
> Thanks - that did the trick.
>
> In the first line of my xml.tpl file, I put {header} and the first thing
> assigned to smarty instance was:
>
> $smarty->assign('header', header("Content-type: application/xml"));
>
> Great!
Do not assign it to smarty. That's unnecessary. header() has nothing to
return (void).
Just use
header("Content-type: application/xml")
in the first line of the php file and it will work as expected. You
don't have to change your template file at all.
Rainer
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.