Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: [SMARTY] Displaying xml
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
>

Report this thread to moderator Post Follow-up to this message
Old Post
George Pitcher
12-07-04 09:23 AM


Re: [SMARTY] Displaying xml
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

Report this thread to moderator Post Follow-up to this message
Old Post
Rainer müller
12-07-04 09:23 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:16 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.