开发者

CakePHP Path Rewriting for controllers/actions and image URLs

开发者_开发百科

I am using CakePHP. I have relative paths for images being generated, stuff like "img/1.jpg", etc.

I found with it sometimes when I call a certain action it redirects to a URL that ends with a /, sometimes it doesn't. So when it ends with something like: http://mysite.com/asdf/

then the image links break

when it goes to http://mysite.com/asdf

the images are fine. How do I standardize how that last "/" is used? Thanks!


For standardize You need to use HTML Helper for displaying images

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜