-1
我想在PHP上顯示BLOB圖像。我可以使用網站PHP正常插入,但我無法顯示。有人能幫我嗎?我正在使用mysql。在PHP上顯示BLOB圖像
我想知道在哪裏我把$圖像正常顯示
這裏是代碼:
<?php
include 'conn.php';
if(isset($_GET['id']))
{
$get_cod = mysqli_real_escape_string($con, $_GET['id']); // GET ID FROM BROWSER
$img = mysqli_query($con,"SELECT * FROM image_user WHERE id_user ='$get_codigo'"); // TABLE QUERY USING FK
$num_rows = mysqli_num_rows($img);
if($num_rows > 0)
{
while($data = mysqli_fetch_assoc($img))
{
$image = $data['image_user']; // I WANT TO GET THE BLOB IMAGE FROM DATABASE THAT WAS INSERTED NORMALLY USING THE FILE READER FROM THE NAVIGADOR IN PHP
}
}
?>
<html>
<head>
</head>
<body>
<img src="profile.php?id=<?php $get_cod; ?>" width="200" alt="user image" title="image">
</body>
</html>
? –
[PHP顯示圖像BLOB來自MySQL]的可能的重複(http://stackoverflow.com/questions/20556773/php-display-image-blob-from-mysql) – Marcus
嘗試尋找[here](http:// stackoverflow。 com/questions/20556773/php-display-image-blob-from-mysql)和/或[here](http://stackoverflow.com/questions/13225726/i-need-my-php-page-to-show -My-斑點圖像從 - 的MySQL數據庫)。 – Marcus