CakePHP图像链接

NDe*_*per 0 html css oop cakephp

我无法找到如何使这个链接到CakePHP中我的图像:

  <img src="img/default.png" width="130" style="position: absolute; top: 0px; left: 0px; z-index: 3; opacity: 0; ">



$html->image('default.png').....????;
Run Code Online (Sandbox Code Playgroud)

非常感谢!

Dun*_*zzz 8

您需要将以下内容添加到options数组中:

'url' => array('controller' => '..' 'action' => '..')
Run Code Online (Sandbox Code Playgroud)

$this->Html->image('default.png', array('url' => ..));
Run Code Online (Sandbox Code Playgroud)

文档中有更多信息