<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>
RangeTime:0.006029s
RangeMem:204.2 KB
返回顶部 留言