我正在尝试获取图像表单数据库,并希望插入页面中。我将图像插入本地文件夹并将名称存储在数据库中。需要检索它。
<?php
global $DBConnect;
$Query = "SELECT * FROM posts ORDER BY datetime DESC ";
$Execute = mysqli_query($DBConnect,$Query);
while ($DataRows = mysqli_fetch_array($Execute)){
$PostID = $DataRows["id"];
$DateTime = $DataRows["datetime"];
$Category = $DataRows["category"];
$Author = ["author"];
$Image = ["image"];
$Post = $DataRows["post"];
?>
<div class="thumbnail">
<img src="uploads/<?php echo $Image;?>">
</div>
<?php }?>
答案 0 :(得分:0)
我没有使用$ DataRows获取图像。这是我的错误。.