开发者

Zend ErrorController view problems

开发者 https://www.devze.com 2023-02-24 22:52 出处:网络
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 th

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

精彩评论

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