<?php
function docdownload($filename)
{
$NomFichier = basename($filename);
$taille=filesize($filename);
ob_end_clean();
header("Content-Type: application/force-download; name=/"$NomFichier/"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $taille");
header("Content-Disposition: attachment; filename=/"$NomFichier/"");
header("Expires: 0");
header("Cache-control: private");
header("Pragma: no-cache");
readfile($filename);
}
docdownload("asd.doc");
?>
php实现下载
最新推荐文章于 2023-09-18 22:52:20 发布
1万+

被折叠的 条评论
为什么被折叠?



