<p>php强制访问类型为下载,自定义内容,自定义文件名称</p> <p>$image_filename='Untitled-2.html';<br /> $return_img=file_get_contents('5.jpg');<br /> header(&quot;Expires: Mon, 26 Jul 1997 05:00:00 GMT&quot;);<br /> header('Content-type: application/octet-stream');<br /> header('Content-type: application/force-download');<br /> header('Content-Disposition: attachment; filename=&quot;'.$image_filename.'&quot;');<br /> echo $return_img;<br /> exit;</p>

按月统计

  1. 2021-12 (357)
  2. 2022-02 (10)
  3. 2022-03 (10)
  4. 2022-05 (1)
  5. 2023-06 (108)
  6. 2023-07 (44)
  7. 2023-08 (3)
  8. 2023-09 (8)
RangeTime:0.020901s
RangeMem:208.3 KB
返回顶部 留言