开发者

where am I supposed to keep images?

I'm new to cakephp and I want to make a link with an image. so I tried this:

$this->Html-link($this->Html->Image('image.png'),'http://website.com');

which I found online. I can't figure out where I need to keep the image files at though. my google searches just开发者_JAVA技巧 had results that said to use the line of code above, but no mention of where the images files should be kept on the file system.


You're missing a >:

$this->Html-link($this->Html->Image('image.png'),'http://website.com'); $this->Html->link($this->Html->Image('image.png'),'http://website.com');

As for your question, where you store the image is up to you. I'm sure Image('image.png') can also take a path like Image('../images/image.png') or whatever you want. You just need to tell it where the image is in that line of code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜