Re: [SMARTY] Displaying xml

From: Date: Sat, 04 Dec 2004 20:51:11 +0000
Subject: Re: [SMARTY] Displaying xml
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12016@lists.php.net to get a copy of this message
George 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

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