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); ?>
- 随机文章
- 热门文章
- 热评文章
- c#保存textbox中的字符串到txt文件中
- 在树莓派/linux上使用阿里云DNS解析作为DDNS使用
- ESP8266在Eclipse下设置编译模式(有boot和无boot)
- SmartLink原理
- 单片机时钟周期,机器周期,指令周期的区别
- linux SSH登录时自动邮件提醒
- MBR 与 GPT分区表详解
- 硬盘分区表、硬盘存储文件详解