I need the system to download an XML file, release the file itself without opening it in the browser, how?
I need the system to download an XML file, release the file itself without opening it in the browser, how?
Yes, it does. Do so
<?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>
";
?>