伙计们。我试图用php加载存储在mysql blob字段中的图像,但图像不能正确显示。在firebug中,我得到了这些信息: get-image.php Dimensions0×0文件大小5.35KBMIME typeimage/jpeg
以下是我的代码
HTML
<html>
<head>
<title>Demo of Database Image in a page</title>
</head>
<body>
Here is your picture:<br>
img
我用文本框将图像存储到SQL数据库中,并将其存储在数据库中,无法从数据库中检索图像。我使用了下面的代码来显示,但它不起作用
// Grab the data from our people table
$sql = "select * from upload";
$result = mysql_query($sql) or die("Could not access DB: " . mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo "<div class=\
我已经将MySQL数据库转换为Postgres。在转换过程中,Postgres中的图片列被创建为bytea。
这段Xojo代码可以在MySQL中运行,但不能在Postgres中运行。
Dim mImage as Picture
mImage = rs.Field("Picture").PictureValue
有什么想法吗?