Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image CakePHP分页器与图像的链接?_Image_Cakephp_Hyperlink_Pagination - Fatal编程技术网

Image CakePHP分页器与图像的链接?

Image CakePHP分页器与图像的链接?,image,cakephp,hyperlink,pagination,Image,Cakephp,Hyperlink,Pagination,我想将分页器链接与图像相结合。 要加载图像,我使用:(显示图像,没有任何问题) 我的自定义分页器链接:(显示链接,没有任何问题) 两者一起将显示链接而不显示图像: $this->Paginator->link($this->Html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'de

我想将分页器链接与图像相结合。

要加载图像,我使用:(显示图像,没有任何问题)

我的自定义分页器链接:(显示链接,没有任何问题)

两者一起将显示链接而不显示图像:

$this->Paginator->link($this->Html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'));
输出:

<img src="/img/arrow_up.png" alt="Duration DESC" />

我的错在哪里?

试试这个

<?php echo $this->Paginator->link($html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'), $options = array('escape' => false)); ?>


输出是一个img标签,但您说它显示一个链接而没有图像?这应该是另一种方式还是我遗漏了什么?你可能应该使用CSS而不是是的,它应该是另一种方式。我不能使用CSS,因为我正在通过php调用分页器。
<img src="/img/arrow_up.png" alt="Duration DESC" />
<?php echo $this->Paginator->link($html->image('arrow_up.png', array("alt" => "Duration DESC")),array('sort' => 'Item.vidduration', 'direction' => 'desc'), $options = array('escape' => false)); ?>