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 6070229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:54:35+00:00 2026-05-23T09:54:35+00:00

I have a problem because i can´t work my images or css when my

  • 0

I have a problem because i can´t work my images or css when my site is like http://www.site.com/shop

Situation:
I have these folders inc img css js

In my root documents i have and in this include i have all the styles.css, scripts and metadata.

So far so good, all the documents work when they are in root document but now i have a new folder called shop where i am putting code to make a store.

mysite/shop

How can i call from the shop/index.php all my images, and css, js and inc ?

I want to avoid using ../img/bla.jpg or ../inc/header.php also because when i include the footer or menu i can´t find the images.

Thanks for all the help.

  • 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-23T09:54:36+00:00Added an answer on May 23, 2026 at 9:54 am

    A direct way to access those from HTML would be to provide the / absolute path that refers to the root of your site ie http://mysite.com/. For example:

    <img src="/img/image.jpg"/> would point to a folder http://mysite.com/img/image.jpg no matter what your current url structure is.

    There are some (quite common) pitfalls of using this inside server-side PHP to reference files from the root of your site(it will try to read files from the root of your drive on UNIX systems for example) but inside client-side HTML code the absolute root / works like a charm, getting the right http://mysite.com/ absolute path.

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

Sidebar

Related Questions

I have a problem where I cannot identify visitors to my intranet page because
I have a problem with some code and I believe it is because of
i still have a problem to develop a convenient app to the user. because
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem with ActionLink. I'd like to pass to my ActionLink parameter for
So this should be pretty easy, yet I can't get it work. I have
I have a problem uploading file to a network shared folder. I can connect
I have a specific problem regarding my website that I built with HTML, CSS,
i have a prioblem with a callback because my Form1 open Form2 and send
I have problem in some JavaScript that I am writing where the Switch statement

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.