我写了一个代码,它是引导网格style.But回显图像路径和显示在网站上,但它没有显示图像。代码工作正常,请帮助我。这里是我的代码图像src与php变量不会显示在网页上的图像
<div class="row">
<?while ($row = mysql_fetch_assoc($query)) {?>
<div class = "col-md-3">
<?php echo $row['keywords'];?>
<?php $imagePath = $row['video_url'];?>
<?php echo $imagePath;?>
<div id="video_thumbnail">
<a href="#" class="thumbnail">
<?php echo '<img src="' . $imagePath . '">'; ?>
<img src="<?php echo file_dir . '/' . $imagePath; ?>" height="100" width="100"/>
</a>
</div>
</div>
<?php } ?>
</div>
'<?php echo'
'; ?>这条线是什么? –
pmahomme
右击检查图片上的检查元素,并检查 – Ghost
好吧,我做到了。感谢@Ghost。这是一个错误的路径。因为我将路径设置为/opt/lampp/htdocs/video_frames/imge.jpg,但它在localhost服务器上运行,所以我将路径设置为/video_frames/image.jpg。现在它工作正常。谢谢大家。 –