提前感谢。
我卡住了,我已经创建了一个通用的搜索引擎,由Nick Frost。但是,我不知道如何从中检索图像,因为每当我添加图像作为$row的一部分或添加HTML图像源代码时,它都会返回错误。
我做错了什么吗?
我的代码如下:
if ($numrows > 0)
{
while ($row = mysql_fetch_assoc($query))
{
$id = $row ['id'];
$title = $row ['title'];
$description = $row ['description'];
$keywords = $row ['keywords'];
$link = $row ['link'];
$image = $row['images'];
echo
"<nav class='table'>
<img src= width='50px' height='80px' 'data:image; base 64, $image'>
<br>
<a href='$link'> $title</a>
<br>
$description
<br>
</nav> ";
}
Replace:
echo "<nav class='table'>
<img src= width='50px' height='80px' 'data:image; base 64, $image'>
<br>
<a href='$link'> $title</a>
<br>
$description
<br>
</nav> ";
:
echo "<nav class='table'>
<img src='data:image; base 64, ".$image."' width='50px' height='80px'>
<br>
<a href='$link'> $title</a>
<br>
$description
<br>
</nav> ";