我想生成这个
<a href="/users/signup" class="sf-with-ul">
<span class="profile-avatar">
<img alt="" src="img/avatar/anonymous.png" height="40" width="40">
</span>
</a>
我写过
<?php echo $this->Html->link(
$this->Html->image('avatar/anonymous.png',array('height' =>40,'width'=>'40')), array('controller' => 'users', 'action' => 'signup'),
array('class' => 'sf-with-ul', 'escape' => false));?>
生成
<a href="/users/signup" class="sf-with-ul"><span class="profile-name"></span><img src="/FindTutor/img/avatar/anonymous.png" height="40" width="40" alt="" /></a>
有任何帮助吗?提前谢谢。
答案 0 :(得分:1)
你可以尝试这只是改变你的图像路径
<?php echo $this->Html->link('<span class="profile-avatar">'. $this->Html->image('home/logo.png',array('width'=>'40px','height'=>'40px'), array('alt' => '')), array('controller' => 'users', 'action' => 'signup' ), array('class' => 'sf-with-ul', 'escape' => false)).'</span>';?>