开发者

Zend ErrorController view problems

I'm having problems with the view for my error controller view in a ZF application. I am using a default layout, and just adding an error message to it. However, my images don't always show up in the view for 404 errors.

If I type a non-existent controller like : mysite.com开发者_如何学Python/contactasddf, it shows the images fine If I type a legit controller, but non-existent action like: mysite.com/contact/asdf, the images don't show up

Thoughts?


How are you referencing the images?

In HTML, use the BaseUrl helper, eg

<img src="<?php echo $this->baseUrl('images/foo.jpg') ?>">

Same goes for referencing stylesheets, just use relative paths from the stylesheet location within the CSS, eg

background-image: url(../images/foo.jpg);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜