我已在数据库中成功添加了图片路径,但无法在网页上显示图片。我想在图像数组的帮助下制作一个图库。有人在这方面帮助我,我怎样才能做到这一点。这是我的代码示例。
<?php
$mac_ID = 2;
$getmachine_qry = "SELECT * FROM MACHINES inner Join Images on machines.id=images.fk_mac_id and fk_mac_id=$mac_ID";
$run_getmachine_qry = mysqli_query($db_con, $getmachine_qry);
while($row_getmachine = mysqli_fetch_array($run_getmachine_qry)){
// $machine_ID = $row_getmachine['id'];
$machine_title = $row_getmachine['machine_title'];
$machine_year = $row_getmachine['year'];
$machine_price = $row_getmachine['price'];
$machine_detail = $row_getmachine['detail'];
$machine_img = $row_getmachine['image'];
?>
<img src="<?php echo $row_getmachine['image'] ?>" style="width:100px"/>
<?php
}?>