$sFileName="filename";
$abs_item="filepath"
header("Content-type: application/octetstream");
header('Content-Length: '.filesize($abs_item));
header("Content-Disposition: attachment; filename="".$sFileName.""");
header("Content-Transfer-Encoding: binary");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9812031/viewspace-914530/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9812031/viewspace-914530/