如何显示存储在MySQL数据库中的图像? [英] How can I display images stored in a MySQL database?
本文介绍了如何显示存储在MySQL数据库中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在MySQL表中有一些jpg图像。如何显示这些图像?
I have some jpg images in MySQL table. How can I display these images?
有人可以通过提供示例代码来帮助我吗?
Could someone please help me by providing sample code?
推荐答案
<?php
$image = $row['myimage'];
header("Content-type: image/gif");
print $image;
exit;
>?
但是存储路径似乎更容易......
But it seems easier just to store the path...
这篇关于如何显示存储在MySQL数据库中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文