<?php
echo $this->Html->link($this->Html->image('files/user/photo/'.$row['User']['photo_dir'].'/'.$row['User']['photo'], array('width' => '200', 'height' => '200')) . ' ' . __('user image'),
array('controller'=>'Profiles'),
array('escape' => false),$row['User']['id']);?>
这里我尝试了像
这样的代码<a href="profiles/index/<?php echo $row['User']['id']; ?>"><img src="files/user/photo/<?php echo ($row['User']['photo_dir']).'/'.($row['User']['photo']);?>" width="200" height="200"/> </a>
但是在蛋糕php页面中,图片网址和图片名称没有得到..html工作但是cakephp核心代码不能正常工作
答案 0 :(得分:0)
试试这个
<?php
echo $this->Html->link(
$this->Html->image('../files/user/photo/'.$row['User']['photo_dir'].'/'.$row['User']['photo'],
array(
'width' => '48',
'height' => '48'
)),
array(
'controller'=>'Profiles',
'action'=>'index',
$row['User']['id']
),
array('escape' => false)
);
?>