首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >从mysql php检索图像时不显示结果

从mysql php检索图像时不显示结果
EN

Stack Overflow用户
提问于 2018-06-26 03:34:26
回答 1查看 31关注 0票数 0

在进行查询时不会显示图像,在浏览器中选中时,会显示一些字母作为结果

图像blob

这是我的代码

<?php 
$con = new mysqli ('localhost', 'cualquiera', '123123','rier');
$datos = $con->query("SELECT * FROM fotos  ") ;?>
<?php  while ($user = $datos->fetch_assoc()){ ?>
<tr>  
<td class="xl80"><div align="center" class="style84"><a 
href="./autos/304862/304862.htm"><strong><?php echo $user['modelo'] ;?>
<?php echo $user['ubicacion'] ; ?></strong></a></div></td>
<td class="xl80"><div align="center" class="style84"><a 
href="./autos/304862/304862.htm"><strong><?php echo $user['anio'] ; ?> 
</strong></a></div></td>
<td class="xl80"><div align="center" class="style84"><a 
href="./autos/304862/304862.htm"><strong><?php echo $user['chasis'] ; ?> 
</strong></a></div></td>

<td class="xl80"><div align="center" class="style84"><a 
href="./autos/304862/304862.htm"><strong><?php echo $user['transmision'] 
; ?></strong></a></div></td>
<td class="xl80"><div align="center" class="style84"><a 
href="./autos/304862/304862.htm"><strong><?php echo $user['color'] ; ?> 
</strong></a></div></td>  
<td class="xl80"><div align="center" class="style84"><a 
href="./autos/304862/304862.htm"><strong><?php echo $user['estado'] ; ?> 
</strong></a></div></td>
<td class="xl80"><div align="center" class="style84"> <?  echo '<img 
src="data:image/jpeg;base64,'.base64_encode( $user['imagen'] ).'"/>'?>                                      
</div></td>
</tr>
<?} ?>

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51030704

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档