-2
這段代碼給了我crums。我想顯示數據庫中的所有圖像PHP請幫助header('Content-Type:image/jpeg')
header("Content-Type: image/jpeg");
$con = mysql_connect("localhost", "admin", "test") or die('Could not connect to server');
mysql_select_db("myweb", $con) or die('Could not connect to database');
$query = "SELECT * FROM photos";
$result = mysql_query($query);
$row = mysql_fetch_array($result,MYSQL_ASSOC);
$pic = $row['pic'];
echo $pic;
看起來你甚至沒有嘗試做任何事情。 – Phiter