好吧,这是一个简短的答案。
<?phpinclude '../connection.php';$id = (int)$_GET['id'];$query = "SELECt * FROM `images` WHERe `image_id` = '$id'";$result=mysql_query($query);$row = mysql_fetch_array($result);$image = $row['image'];$image_type= $row['image_type'];$size = $row['image_size'];//alternative$ext = explode('/', $image_type);$name = $id . '.' . $ext[1];header("Content-type: $image_type");header("Content-length: $size");header("Content-Disposition: attachment; filename=$name");print $image; exit;检查您的Blob类型是否至少为MEDIUMBLOB,它能够存储高达16M的数据



