header("Content-type: APPLICATION/OCTET-STREAM");
header("Content-Disposition: attachment; filename=文件名");
header("Content-Description: PHP3 Generated Data");
header("Content-Disposition: attachment; filename=文件名");
header("Content-Description: PHP3 Generated Data");
Header("Location:report03_doc/report03.doc");
能不能在此基礎上解決呀
$result = MYSQL_QUERY($query);
$size = MYSQL_RESULT($result,0,"file_size");
$dname = MYSQL_RESULT($result,0,"file_name");
$type="unknown/unknown";
header("Content-length: $size");
header("Content-type: $type");
header( "Content-disposition: attachment; filename=$dname" );
readfile("upload/".$dname);
<?php
header("Content-type:application/vnd.ms-word");
header("Content-Disposition:filename=test.doc");
?>
注意要安装word