Home > Common Problem > body text

What is the difference between relative path and absolute path

王林
Release: 2020-05-10 10:28:33
Original
18085 people have browsed it

What is the difference between relative path and absolute path

Absolute path:

The absolute path is the real path of the file or directory on your home page on the hard disk, (URL and physical path )For example: C:\xyz\test.txt represents the absolute path of the test.txt file. http://www.sun.com/index.htm also represents an absolute URL path.

Relative path:

The path relative to a certain base directory. Contains the relative path of the Web (relative directory in HTML). For example: in Servlet, "/" represents the root directory of the Web application. Relative representation of physical path, for example: "./" represents the current directory, "../" represents the upper-level directory. This similar representation also belongs to relative path.

The above is the detailed content of What is the difference between relative path and absolute path. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template