The proper content type is text/xml.


-----Original Message-----
From: bill [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 05, 2001 3:11 PM
To: Tyler Longren
Subject: Re: [PHP] xml header

Hmmm.  I'm thinking of the http headers.

Assume you have an xml file in memory as a variable ($xmlfiledata) and 
you want to send it to the browser.

If you just echo it, you are sending it as text (which isn't necessarily

bad, it just isn't as good as it should be, I think).

So far, I've been tossing this around:

header("Content-Type: application/xml; charset=iso-8859-1");
header ("Content-length: $clength");
echo "$xmlfiledata";

I thought about sending "Content-Type: text/xml" too.

Any thoughts.

kind regards,

bill hollett

Tyler Longren wrote:

>Hi Bill,
>I don't believe there are any.
>----- Original Message ----- 
>From: "bill" <[EMAIL PROTECTED]>
>Sent: Wednesday, December 05, 2001 1:42 PM
>Subject: [PHP] xml header
>>What is the proper header to send when presenting dynamic xml pages to

>>the browser?
>>PHP General Mailing List (
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail:

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to