In the process of computer learning will often encounter the absolute path and the relative path these two concepts, today to talk about in detail

Absolute path definition:

The absolute path is the path where the file actually exists on the hard disk, for example: “E:\book\ page \ code \ chapter 2 \bg.jpg”

Relative path:

The path relative to the current file. /bg.jpg ; “Bg.jpg” is a relative path to the current file

Add:

… / Current directory Upper level directory (parent directory)… /… / Two levels above the current directory (grandparent directory)

In development we often use relative directories… / or./ and then we can find the corresponding file directly because when we package and upload the web page here, we can’t find the absolute path, which means he doesn’t know that you have the file book in your e-drive, and he can’t find it

To find the absolute address of a file, click the file right-click property



This is the absolute address