当前位置:首页 > 网页 > php做下载连接/下载功能

php做下载连接/下载功能

<?php
$vison=$_GET['vison'];
$name=$_GET['name'];
$path=dirname(__FILE__).'/'.$vison.'/'.$name;
function downfile($fileurl,$filename)
{
 ob_start(); 
 header( "Content-type:  application/octet-stream "); 
 header( "Accept-Ranges:  bytes "); 
 header( "Content-Disposition:  attachment;  filename= {$filename}"); 
 $size=readfile($fileurl); 
  header( "Content-length: " .$size);
}
 downfile($path,$name);
?>

除特别注明外,本站所有文章均为视觉电子科技原创,转载请注明出处来自https://feelsight.cn/post/47.html

赞 (2

发表评论

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

分享:

支付宝

微信