Menu
hi,
I am trying to create a xml and forcefully download the xml from php script.
Find my code below .
<?php
$name = $_POST[“name”];
$data = $
header(“Cache-Control: public”);
header(“Content-Description: File Transfer”);
header(“Content-Disposition: attachment; filename=”.$name);
header(“Content-Type: text/xml”);
header(“Content-Transfer-Encoding: binary”);
echo $data;
?>
$name – i am getting the name of the file
$data — xml string
i am calling this complete php page from Jquery ajax request.