i have generated a xls file in a Cordova App Using PHP and i want to download it. It is perfectly working in Android , In the case of ios the file is opening on the browser But not downloading.
Here my code is.
<?php
$output .= '"S.No","Invoice No","Invoice Date"'."\n";
$output .= '"S.No","Invoice No","Invoice Date"'."\n";
$output .= '"S.No","Invoice No","Invoice Date"'."\n";
$output .="\n";
$date=date('d-m-Y H:i:s');
$filename = "report".$date.".csv";
header('Content-type: application/xls');
header('Content-Disposition: attachment; filename='.$filename);
echo $output;
exit;
?>