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); ?>
- 随机文章
- 热门文章
- 热评文章
- php接收post乱码解决
- C#获取机器码的方法详解(机器名,CPU编号,硬盘编号,网卡mac等)
- 微信公众平台API接口扩展包
- C#图片处理示例(裁剪,缩放,清晰度,水印)
- 永恒之蓝病毒是什么 怎么防范ONION勒索软件
- 物联网 WIFI 一键配置原理(smartconfig) ESP8266/QCA4004
- php做下载连接/下载功能
- 乐高EV3与单片机蓝牙通讯