1

My main page displays a list of post, with an icon at the beginning of each popst.

When I click next page (paginator), all lines are displayed without icons. There is an square insstead of the icons.

Thank you for your help

I'm linking the icon in the following way

<img src="webroot\img\cake.icon.png" alt="Smiley face" height="42" width="42"> 
4

1 回答 1

1

webroot\img\cake.icon.png似乎是服务器路径,而不是 URL 路径,这是需要的。

尝试将图像的 src 属性更改为,/img/cake.icon.png或者,如果您的 CakePHP 安装在子目录中,则更改为/subdir/img/cake.icon.png

于 2013-08-23T13:16:28.303 回答