21,886
社区成员
发帖
与我相关
我的任务
分享
header("Content-type: application/msword");
header("Accept-Ranges: bytes");
header("Accept-Length:".filesize("../attachement/app_form/52d75250b03ec.doc"));
header("Content-Disposition: attachment; filename=data.doc");
$res=fopen("../attachement/app_form/52d75250b03ec.doc","rb");
echo fread($res,filesize("../attachement/app_form/52d75250b03ec.doc"));
fclose($res);
exit();
Array ( [0] => HTTP/1.1 200 OK [1] => Date: Fri, 17 Jan 2014 03:54:41 GMT [2] => Server: Apache/2.2.8 (Unix) PHP/5.2.14 [3] => X-Powered-By: PHP/5.2.14 [4] => Connection: close [5] => Content-Type: text/html [6] => Set-Cookie: SESSION_COOKIE=5; path=/ [7] => Cache-control: private )
header("Content-type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length:".filesize("../attachement/app_form/52d75250b03ec.doc"));
header("Content-Disposition: attachment; filename=data.doc");
$res=fopen("../attachement/app_form/52d75250b03ec.doc","rb");
echo fread($res,filesize("../attachement/app_form/52d75250b03ec.doc"));
fclose($res);
exit();