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实现表单内容写入txt文件的代码
- 页面定时跳转(倒计时跳转)代码总结
- 用PHP发送POST请求
- C# 非独占延时函数 非Sleep
- 基于C#的socket编程的TCP异步实现
- 在树莓派/linux上使用阿里云DNS解析作为DDNS使用
- 安装包制作工具 SetupFactory使用2 API清单
- C#中的MessageBox消息对话框