CakePHP Image Link
I can't find how a make this a link to my image in CakePHP:
<img src="img/default.png" width="130" style="po开发者_如何转开发sition: absolute; top: 0px; left: 0px; z-index: 3; opacity: 0; ">
$html->image('default.png').....????;
Many Thanks!
You need to add the following to the options array:
'url' => array('controller' => '..' 'action' => '..')
i.e.
$this->Html->image('default.png', array('url' => ..));
There's more information in the documentation
echo $this->Html->image(BASE_URL."images/plus.jpg",array("alt" => 'add fields',"id"=>"add_more","height"=>40,"width"=>40));
精彩评论