Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 979705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:15:38+00:00 2026-05-16T04:15:38+00:00

I am a bit lost here, solution could be lurking under my nose but

  • 0

I am a bit lost here, solution could be lurking under my nose but I couldn’t get, thought of you guys if any one can help.

Here is the problem:
I have Zend Framework standard file layout:

Project
  -application
     -controllers
     -views 
     -layouts
        -scripts
           -layouts.phtml
  -library
  -public
     -images
     -index.php

Now The problem is, I am referencing images in layouts.phtml by just images/logo.gif etc. and same in the controller views /images/arrow.gif

That works fine if the request is simple http://servername/project/controller

but if the request is more deep like http://servername/project/controller/index/page/2

the images break theirselves, they clearly can’t get the path, what I am noticing is, if I am on later request, the image path will be http://servername/project/controller/index/page/2/images/logo.gif which is not there, the image is in public/images

My understanding was (and I have googled it a bit as well) framework knows the default public and will route the images to public/images always. However, this is not working. Do I have to add some re-write rule or something?

Can anyone help please? I will be grateful!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:15:39+00:00Added an answer on May 16, 2026 at 4:15 am

    Sometimes you should first ask the person sitting next to you!

    Here is the solution:

    <?=$this->baseUrl('images/logo.gif')?>
    

    Edit after further investigation

    For record and to help others: You can access images folder in public as you normally would in non Zend framework environment if you have configured your DocumentRoot properly. I only made a virtual directory in my httpdconf while if you do not create a VirtualHost and do not give DocumentRoot to it while your files are also not in default htdocs directory, expect this problem. See Create a Virtual Host heading in following URL:
    http://framework.zend.com/manual/en/learning.quickstart.create-project.html and that will solve the problem!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

any bit of info will be helpful here. or does anybody else huge do
We are a bit lost here. We need to make our app installable on
I'm a bit lost here with how the ListView works. When my ListView is
I'm a bit lost here. I have a class subclassed from UIView called BalloonGuy.
I'm a bit lost here... I have several tables I'd like to pull a
HI, I'm a bit lost with Entity Framework ... Here is the context :
I've tried searching around for answers to this but I'm still a bit lost.
I am a bit lost here as I have not really looked at model
Bit of an obscure one this. My setup is all running on my local
A bit of a neophyte haskell question, but I came across this example in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.