嗨,我之前问过一个关于从 MySQL 数据库 Blob 中检索图像的类似问题。
我正在使用代码:
header("Content-type: image/jpeg"); // change it to the right extension
print $image; //where image is the blob file
这段代码嵌套在网页中,所以我还应该修改标题吗?当我包含 header() 时,它会删除所有网页代码,我认为这是因为我正在更改浏览器呈现为 image/jpeg 的文件类型?如何在网页内显示图像?谢谢!