Guest User

Untitled

a guest
Aug 10th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. // Example file structure
  2. htdocs // Root folder
  3. - index.html
  4. - about_us/
  5. - index.html
  6. - css/
  7. - base.css
  8. - images/
  9. - logo.png
  10.  
  11. If we wanted to access the image "logo.png" from "index.html", our file path would need to be:
  12. img/logo.png
  13. However, if we wanted to access the image about_us/index.html, our file path would need to be:
  14. /img/logo.png
  15. OR
  16. ../img/logo.png
  17. 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