Re: xml header
| From: | bill | Date: | Wed, 05 Dec 2001 20:10:33 +0000 |
| Subject: | Re: xml header | ||
| References: | 1 2 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-76775@lists.php.net to get a copy of this message | ||
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 headerWhat 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