方法一:
$downloadfile=”somefile.txt”;
header(“Content-disposition: attachment; filename=$downloadfile”);
header(“Content-Type: application/force-download”);

方法二: