帮助我的图片无法显示在我的网站上,有人可以帮助我吗?
<div class="row">
<ul class="portfolio-list lightbox m-none" data-plugin-options="{'delegate': 'a.lightbox-portfolio', 'type': 'image', 'gallery': {'enabled': true}}">
<li class="col-md-3 col-sm-6 col-xs-12">
<div class="portfolio-item">
<span class="thumb-info thumb-info-lighten thumb-info-centered-icons">
<span class="thumb-info-wrapper">
<img src="<?php echo $row1['alamat_galeri']; ?>" class="img-responsive" alt="" style="width:100%">
<span class="thumb-info-action">
<a href="<?php echo $row1['alamat_galeri']; ?>" class="lightbox-portfolio">
<span class="thumb-info-action-icon thumb-info-action-icon-light"><i class="fa fa-search-plus"></i></span>
</a>
</span>
</span>
</span>
</div>
</li>
答案 0 :(得分:0)
应该是这样的:
将site_url()
或base_url()
与src
属性一起添加
注意 :确保图像路径正确
<img src="<?=site_url($row1['alamat_galeri']);?>"
class="img-responsive"
style="width:100%" >
如果您的图片位于文件夹galeri
* /
<img src="<?=site_url('galeri'.$row1['alamat_galeri']);?>"
class="img-responsive"
style="width:100%" >
更多信息:https://www.codeigniter.com/user_guide/helpers/url_helper.html