1. 首页
  2. 数据库
  3. 其它
  4. php 强制下载文件实现代码

php 强制下载文件实现代码

上传者: 2020-12-31 07:42:46上传 PDF文件 24.06KB 热度 13次
复制代码 代码如下:<?php $file = ‘monkey.gif’; if (file_exists($file)) { header(‘Content-Description: File Transfer’); header(‘Content-Type: application/octet-stream’); header(‘Content-Disposition: attachment; filename=’.basename($file)); header(‘Content-Transfer-Encoding: binary’); he
下载地址
用户评论