RE: [PHP] xml header
| From: | Matthew Loff | Date: | Wed, 05 Dec 2001 20:42:25 +0000 |
| Subject: | RE: [PHP] xml header | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76778@lists.php.net to get a copy of this message | ||
The proper content type is text/xml.
--Matt
-----Original Message-----
From: bill [mailto:bill@billtron.com]
Sent: Wednesday, December 05, 2001 3:11 PM
To: Tyler Longren
Cc: php-general@lists.php.net
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:
$clength=strlen($xmlfiledata);
header("Host: myhost.com");
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.
>
>Tyler
>
>----- Original Message -----
>From: "bill" <bill@billtron.com>
>To: <php-general@lists.php.net>
>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 (http://www.php.net/)
>>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>>For additional commands, e-mail: php-general-help@lists.php.net
>>To contact the list administrators, e-mail:
php-list-admin@lists.php.net
>>
>>
>