
In our case, which is PHP, the Current Directory is usually the directory containing the file executed. The two paths shown earlier, are both absolute paths.Ī relative path, is a path starting from the Current Directory of your program.

In Windows, that means the inclusion of the drive letter (like C:) and in Linux, that means the inclusion of the root slash (/) The URLs are used for accessing a page from the net, while the paths are usually used for accessing files, within a computer, or LAN.Īn absolute path is a path that starts right from the root of your computer file system. It's true that they look alike with Linux paths, but there is a main difference.

This article's purpose is to explain what is a Relative, and what is an Absolute File Path.įirst, though, we need to specify what is path.Ī path is a sequence of directory names, usually leading to a file or directory.Ī typical path in Windows looks like: C:\Documents and Settings\Christopher\My Documents\My Pictures\funny.jpgĪ typical path in Linux looks like: /var/home/Christopher/documents/pictures/funny.jpg
