Sunday, January 28, 2018

Lesson 18 (file paths)

We have a situation, here. Normally, I know
what to do to open an image file from an html
call.
<img src:"MyPictures/Bird.jpg" >

But what happens if the calling html is in the folder and the image
on the desktop ie the caller is one down from the image.
It turns out there is a certain way to do this.




Voilà: I have indicated that the bird image is one up with ../
(For recall, file systems do this by inverting the direction of the slash\).
I would use ../MyPictures/HappyB.jpg if the Bird ios in a MyPictures folder and
my html is in a MyCode Folder ...I still have to go up, then down.

The limiting case occurs when dealing with the root folder;
one just uses /Nameof. This would be the case for the 'index'
folder of a web site.

                               *     *     *


No comments: