<?php
//include database connection
include("include/db.php");
//select the image
$query = "SELECT image FROM fresult WHERE result_id = 1";
$result = mysql_query($query) or die('SQL error');
while($row1 = mysql_fetch_array($result, MYSQL_ASSOC))
{
header("Content-type: image/jpg");
//display the image data
print $row1['image'];
//exit;
}
?>
这段代码有什么问题?我不明白。
我尝试使用简单的代码来检索图像。我使用xampp,SQL blob。