我在CakePHP中創建網站儀表板。並且我使用引導程序3.0。如何在CakePHP模板文件(default.ctp)上顯示圖像使用引導程序
1)我想在default.ctp
文件中顯示webroot/img
中的圖像。
2)我想要該圖像顯示在thumbnails(bootstrap)
div內。
我用html helper
即echo $this->Html->image('img.png', array('alt' => 'CakePHP'));
爲img
標籤的source
屬性。
,但沒有工作..
編輯
這是我如何引導代碼內接受審判。
<div class="row"
<p><b>Target Image</b></p>
<div class="col-lg-3 col-md-3 col-sm-3">
<a href="#" class="thumbnail">
<img data-src="holder.js/100%x100" src="<?php $this->Html->image('img.png', array('alt' => 'CakePHP', 'border' => '0')); ?>" />
</a>
</div>
</div>
號。「這 - $> HTML的「形象」指向「IMG」目錄隱含.. –
然後你能證明所產生的HTML代碼? –
多數民衆贊成多數民衆贊成在什麼問題是..如果我寫在引導縮略圖div之外,那麼它會顯示圖像..但我希望該圖像顯示在該框內..請看看編輯的代碼.. –