process.php文件如下:
$file = $_GET['file']; header("Content-type: octet/stream"); header("Content-disposition:attachment;filename=".$file.";"); header("Content-Length:".filesize($file)); readfile($file); exit;
html文件如下:
<a href="process.php?file=pic.jpg">Image goes Here</a>
希望本文所述对大家的php程序设计有所帮助。
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群