【发布时间】:2014-06-03 10:43:19
【问题描述】:
使用 Cakephp html 助手,我如何在蛋糕中做到这一点?
<a class="logo" href="index.php">
<img src="img/logo.png">
</a>
我这样做了:
echo $this->Html->image("logo.png", array(
"alt" => "Logo",
"class" => "logo",
'url' => array(
'controller' => 'Home',
'action' => 'index'
)
));
这将执行此 html 代码:
<a href="/Root/Home/index/">
<img class='logo' alt="ArtBid Logo" src="/artbid/img/logo.png">
</a>
但是“logo”类转到 img 而不是应该的锚点。
【问题讨论】:
标签: php cakephp html-helper