Codice PHP:
<?
$download
="file.txt";
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=" basename($download) );    
readfile($download);
?>