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); ?>
- 随机文章
- 热门文章
- 热评文章
- html网页 swf播放器使用代码
- php接收post乱码解决
- Libview写软件更新升级程序
- PHP文件操作之,插入某行,删除某行,获取行号
- UDP打洞原理及代码
- UDP穿透NAT的原理与实现(UDP“打洞”原理)
- C#获取机器码的方法详解(机器名,CPU编号,硬盘编号,网卡mac等)
- C# 非独占延时函数 非Sleep