Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example file structure
- htdocs // Root folder
- - index.html
- - about_us/
- - index.html
- - css/
- - base.css
- - images/
- - logo.png
- If we wanted to access the image "logo.png" from "index.html", our file path would need to be:
- img/logo.png
- However, if we wanted to access the image about_us/index.html, our file path would need to be:
- /img/logo.png
- OR
- ../img/logo.png
- The first, using a "/" at the start, takes us to our root folder, in this case it is "htdocs." The second, using "../" at the start takes us to the next directory "above" the one we're in. The directory above "about_us" is "htdocs."
Advertisement
Add Comment
Please, Sign In to add comment