Absolute vs Relative path
- Date added:
- Wednesday, 04 February 2009
- Last revised:
- Tuesday, 14 July 2009
Answer
Absolute path
Also known as the full path, the absolute path is a path that contains the root directory and all other sub directories required to get into the directory you're currently in or to which you wish to get. Below is a basic example of a generic path and an absolute path.
Example Absolute path:
/home/users/myuser/public_html
Relative path
Also known as a partial path or non absolute path, a relative path is only a portion of the full path.
A relative path is often used in creating a web page;
for example
instead of specifying "http://www.computerhope.com/index.htm" we would only specify "index.htm" if the page linking to the index.htm is in the same directory. See our absolute path definition for additional examples.

