Large inventory of Path Problems and large inventory of paths

Source: Internet
Author: User

Large inventory of Path Problems and large inventory of paths
1. the Physical path is the Physical path, which refers to the file path in the hard disk. For example, the following file location Representation Method: D: \ A \ B \ a.html

D: \ A \ B \ C \ B .html

D: \ A \ B \ C \ c.html

D: \ A \ B \ C \ D \ d.html

2. Relative Path

The full name of the Relative Path is Relative Path. The following uses the example above to understand its usage in three aspects.

1. Files in the same directory

B .htmland c.html are under the same folder. If B .html#is linked to c.html, you can write in B .html as follows:

<Span style = "font-family: Microsoft YaHei; font-size: 18px; "> <a href =" c.html "> file links in the same directory </a> </span>

2. Files in the parent directory

A.html is a file in the upper-level directory of B .html and c.html. If B .html or c.html is linked to a.html, you can write it in B .html or c.html as follows:

<Span style = "font-family: Microsoft YaHei; font-size: 18px;"> <a href = ".. /a.html "> link to files in the parent directory </a> </span>

In the Code, "../" indicates the upper-level directory (separated by a directory). In ".../../", write:

<Span style = "font-family: Microsoft YaHei; font-size: 18px;"> <a href = ".. /.. /a.html "> link to files in the upper-level directory of the upper-level directory </a> </span>

3. Files in the lower-level directory

B .html and c.html are the files in the.html directory. If you want to link B .html in a.html, then write them in a.html as follows:

<Span style = "font-family: Microsoft YaHei; font-size: 18px;"> <a href = "C/B .html"> link to a lower-level directory (C) files in </a> </span>
 

If the connector is linked to d.html in a.html, you can write it in a.html as follows:

<Span style = "font-family: Microsoft YaHei; font-size: 18px; "> <a href =" C/D/d.html "> link to a file in the lower-level directory (C/D/) </a> </span>

3. absolute path

The full name of the Absolute Path is Absolute Path, which contains the URL. For example, if you have A domain name www.lfsy.com whose domain name points to D: \ A, then the above four files can be expressed as follows:

<Span style = "font-family: Microsoft YaHei; font-size: 18px; "> <a href =" http://www.lfsy.com/ B /a.html "> chain to a.html </a> <a href =" http://www.lfsy.com/ B /C/ B .html "> chain to B .html </a> <a href =" http://www.lfsy.com/ B /C/c.html "> chain to c.html </> <a href = "http://www.lfsy.com/ B /C/D/d.html"> chain to d.html </a> </span>

Iv. root directory

The full name of the Root directory is: Root directory. The domain name before the absolute path is the Root directory, so it can be understood as the top directory of the website. Its representation is as follows:

<Span style = "font-family: Microsoft YaHei; font-size: 18px; "> <a href ="/B/a.html "> link to a.html </a> <a href ="/B/C/B .html "> link to B .html </a> <a href = "/B/C/c.html"> link to c.html </a> <a href = "/B/C/D/d.html"> link to d.html </a> </span>

Summary:

A physical path can be used to Access a database or not use a web server. The root directory and absolute path are easy to use. They are all searched from the top directory of the website and checked down at the first level. Their disadvantage is that the program is not easy to transplant. Relative paths are most commonly used in website creation. Distinguish between these paths and avoid file failures when creating hyperlinks.



For Path Problems

URL
A Uniform Resource Locator (URL, abbreviated as "Uniform Resource Locator") is also called a webpage address, which is a standard Resource address on the Internet. It was originally invented by Tim berneas-Lee as the address of the World Wide Web. Now it has been compiled into the Internet standard RFC1738 by the World Wide Web alliance.

In the history of the Internet, the invention of a uniform resource locator is a very basic step. The syntax for unified resource locator is general and extensible. It uses part of the ASCII code to represent the Internet address. Generally, the beginning of a uniform resource identifier indicates the network protocol used by a computer network.

UNC
Unc sharing refers to the sharing of network hard disks!

What is a UNC path?

The UNC path is mentioned in many places. What is a UNC path?

What is a UNC path? The UNC path is a network path similar to \ softer. It complies with the \ servername \ sharename format, where servername is the server name and sharename is the name of the shared resource. The UNC name of a directory or file can include the directory path under the shared name in the format of \ servername \ sharename \ directory \ filename.
For example, the shared folder named it168 on softer is \ softer \ it168 in UNC, if it is the default management share C $ of softer computer, \ softer \ c $ is used.
The familiar command line access method should be called the UNC path access method.

Local path
Is the disk path of the local computer.
For example, D: \ CY2002 \ DA \ IS \

Internet connection path
Is the network address
Example: www.163.com
Www.baidu.com

Three paths in HTML

= 1 absolute path, which consists of the addresses on the disk, such as d: \ images \ 001.jpg
= 2. Path: the path at the top of the website space. It can be expressed by "dot + slash "./".
= 3 relative path, which is the relative path of a website page, such as aa.html. If a link in the path is/images/001.jpg, the relative path of the images and aa.html is parallel.

According to the website usage frequency, 3 is the most, followed by 2, 1 is the least ..
The relative path does not cause errors due to environment changes (such as local upload to space.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.