Home >Common Problem >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!