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

  • SEARCH
  • Home
  • 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 3280956
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:45:45+00:00 2026-05-17T19:45:45+00:00

Hello I am using an MVC architecture for my web application. Now the problem

  • 0

Hello I am using an MVC architecture for my web application. Now the problem is I have my views in one place and have my images folder in another place. Now I am unable to get my images printed in the right places since, I cannot get my paths right. Even though I give the absolute paths, the images are not getting printed.

images location: /var/www/app_name/web_root/images/1.png

views location: /var/www/app_name/views/controller_name/view1.php

so now in view1.php, I have to add an image and this is how I am trying to link to the image using relative paths.

 <td align="left"><a id="nextlink2" href="#"><img src="../../webroot/images/1.png" width="64" height="64" border="0" /></a></td>

This is the path I am using for absolute path, none of them are working.

 <td align="left"><a id="nextlink2" href="#"><img src="/var/www/app_name/webroot/images/1.png" width="64" height="64" border="0" /></a></td>

And in both the cases, I am unable to get the image to be displayed. What could the cause be? Any help would be great.

Thank you!

  • 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-17T19:45:46+00:00Added an answer on May 17, 2026 at 7:45 pm

    You’re right to use an absolute path, but an absolute path in web terms is one from the web root, not the full path to the file. So in your case, this should work:

    <td align="left"><a id="nextlink2" href="#"><img src="/images/1.png" width="64" height="64" border="0" /></a></td>
    

    similarly your relative path example would work as:

    <img src="../../images/1.png" width="64" height="64" border="0" />
    

    but I’d stick with absolute paths.

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

Sidebar

Related Questions

I'd like to create a basic Hello World style application for the IPhone using
I have the following line: 14:48 say;0ed673079715c343281355c2a1fde843;2;laka;hello ;) I parse this by using a
I added a homecontroller to an application using mvc. I think it should only
Would it be possible to print Hello twice using single condition ? if condition
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello I have always been thinking which is the best way of writing html
I've recently set up an ASP.net site (not using MVC.net) to use URL Routing
I am developing a Zend MVC application. Sometimes I like to echo some text
i have been working on a new .net MVC site and have integrated some

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.