1
I need the system to download an XML file, release the file itself, without opening it in the browser, has as?
1
I need the system to download an XML file, release the file itself, without opening it in the browser, has as?
2
There is. Do it like this
<?php
header('Content-disposition: attachment; filename="file.xml"');
header('Content-type: "text/xml"; charset="utf8"');
readfile('file.xml');
?>
or
<?php
header('Content-disposition: attachment; filename="file.xml"');
header('Content-type: "text/xml"; charset="utf8"');
echo "<?xml version="1.0" encoding="UTF-8"?>
<root>
<tag>Oi</tag>
</root>
";
?>
Browser other questions tagged php javascript jquery xml download
You are not signed in. Login or sign up in order to post.
I believe so.
– user28595
Yes you have how to use
readfile
(php),XMLHttpRequest
(javascript) andajax
(jquery)– KingRider