What is Absolute Path

Absolute Path is the location of a directory or file in a computer. It contains the root directory as well as all other sub directories that contain the file or directory. Paths are used extensively in operating systems to represent file and directory relationships. They are also necessary to the operation of the internet and form the basis of URLs.

It is also used extensively in operating systems to represent file and directory relationships. They are also necessary to the operation of the internet and form the basis of URLs.

Absolute paths use a root directory that is usually at the top of the file tree. This means that no matter what directory you are currently in you can always use this path to locate a resource on the system.

Examples, in Linux and Unix based operating systems and web servers the absolute path usually starts with a forward slash /. Each directory is then separated by forward slashes.

/home/paul/www/url/index.php

In Microsoft Windows based operating systems and web servers it usually starts with a drive letter and is separated by backslashes.

Example;

C:\Windows\Users\paul\html\docs\url\index.php

URLs follow the Unix convention of using forwards slashes to separate files and directories on servers.

Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top