-2
我在cakephp中創建登錄頁面。我沒有寫「登錄」,而是想要展示一張圖片。這是我嘗試:將圖像添加到cakephp的登錄頁面
<br>
<div class="index large-4 medium-4 large-offset-4 medium-offset-4 columns">
<div class="panel">
<h2 class="text-center"><img src="img/cake.icon.png" /></h2>
<?= $this->Form->create(); ?>
<?= $this->Form->input('email'); ?>
<?= $this->Form->input('password', array('type' => 'password')); ?>
<?= $this->Form->submit('Login', array('class' => 'button')); ?>
<?= $this->Form->end(); ?>
</div>
</div>
在上面的佈局,我嘗試添加圖像logo.png
,而不是顯示「登錄」。但是,圖像沒有加載。我已將圖像放入webroot/img/logo.png中。但是,圖像未加載。這有什麼問題?我應該更改或添加什麼?
我試了一下,它不工作! – SSS
爲了解決這個問題,你需要確定爲什麼圖像沒有被頁面加載。請確保您可以通過http:// yourUrl /img/logo.png訪問該映像 - 如果可以在瀏覽器中加載它,請在加載頁面時按f12鍵,並在頁面嘗試加載時查看返回的狀態代碼圖片 – hairmot