<?php
$filename = '路径+实际文件名';
//文件的类型
header('Content-type: application/x-msdownload');
//下载显示的名字
header('Content-Disposition: attachment; filename="保存时的文件名.exe"');
readfile("$filename");
exit();
?>
文件类型大全 http://www.skyfox.org/php-upload-format.html
转载请注明:天狐博客 » PHP下载并自动命名