Return to Snippet

Revision: 9657
at November 16, 2008 16:40 by paulbooker


Initial Code
$file = "exported_data.txt" ;
// open a file to export data   ...
$open = fopen($file,"w+") ;
// write selected exported data to a file ..........
fwrite($open,$exported_data);
fclose($open);
// download ...
header("Content-Type: application/octet-stream");
header("Content-disposition: attachment; filename=exported_data.txt");
print($export_affiliate_data);
exit();

Initial URL


Initial Description


Initial Title
Dynamic creation of a file and immediate download

Initial Tags


Initial Language
PHP