RE: [SMARTY] Displaying xml

From: Date: Sat, 04 Dec 2004 14:12:10 +0000
Subject: RE: [SMARTY] Displaying xml
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12015@lists.php.net to get a copy of this message
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: > > Hi, > > > > I'd like to display my results as an xml page. Is there a way I > can do this > > using Smarty (in use for the rst of my sites)? > > 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 >

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