note 96273 added to function.xmlwriter-open-uri
| From: | DaveRandom at osu1 dot php dot net | Date: | Thu, 18 Feb 2010 00:47:34 +0000 |
| Subject: | note 96273 added to function.xmlwriter-open-uri | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166104@lists.php.net to get a copy of this message | ||
While what icepick dot pt at hotmail dot com writes is largely correct, in fact all you need is:
<?php
header("Content-Disposition: attachment; filename='file_name.xml'");
?>
Whereas:
<?php
header("Content-Type: text/html/force-download");
?>
Sends what is technically an invalid MIME type.
While most HTTP servers will automatically send the correct MIME type (where required), the
standards for which header to send under which circumstances are a little unclear.
FURTHER READING:
http://en.wikipedia.org/wiki/XML_and_MIME
http://www.w3.org/TR/xhtml-media-types/ (XHTML
specific)
----
Server IP: 78.110.173.36
Probable Submitter: 87.127.188.153
----
Manual Page -- http://www.php.net/manual/en/function.xmlwriter-open-uri.php
Edit -- https://master.php.net/note/edit/96273
Del: integrated -- https://master.php.net/note/delete/96273/integrated
Del: useless -- https://master.php.net/note/delete/96273/useless
Del: bad code -- https://master.php.net/note/delete/96273/bad+code
Del: spam -- https://master.php.net/note/delete/96273/spam
Del: non-english -- https://master.php.net/note/delete/96273/non-english
Del: in docs -- https://master.php.net/note/delete/96273/in+docs
Del: other reasons-- https://master.php.net/note/delete/96273
Reject -- https://master.php.net/note/reject/96273
Search -- https://master.php.net/manage/user-notes.php