说明 - >我只想从我的网页中获取图像,我已经将BLOB类型提供给数据库,我将数据库存储在哪里,我如何获取该图像,在此代码中我得到了图像的小图标,格式已损坏。
<?php
$connection = mysqli_connect("localhost", "****", "******","****");
$find_data =mysqli_query($connection,"SELECT * FROM ashish " );
while($row = mysqli_fetch_assoc($find_data)){
$current=$row['weblink'];$asdf=$row['webrate'];$imag =$row['weblogo'];
$ima =$row['weblogo'];
}
?>
<form action="ashishdb" method="post" enctype="multipart/form-data">
<div><p>WebSite Link :<input type="text" name="weblink"> Websites Rating : <input type="text" name="webrate"> Website Logo : <input type="file" name="weblogo"></p>
<p align="center"><input type="submit" value="Submit" name="btn_file"></p>
</div>
<table style="width:100%">
<tr>
<th>A</th>
<th>A</th>
<th>A</th>
</tr>
<tr>
<td><?php echo $current ?></td>
<td><?php echo $asdf ?></td>
<td><img src=<?php echo $ima ?> ></td>
</tr>
</table>
</form>
</body></html>
答案 0 :(得分:-2)
如果你的&#34; ashish&#34; table&#34; weblogo&#34;列包含图片的路径或网址,您可以尝试:
<img src="<?php echo $ima; ?>" >
或
<img src="<?=$ima?>" >