I use this code all the time to download files:
<?
header("Content-Type: application/download\n");
header("Content-Disposition: attachment; filename=\"$dirname\"");
$fn=fopen("./ebooks/$loc/$dirname" , "r");
fpassthru($fn);
?>
Is there a way to download a file that doesn't exist.
What I mean is:
If I make an array that conatins all the values of a .csv file from results from a mysql database, and I want to download that string or array as a .csv file, but do not want to write the file to the server......is there a way to do this?