Home  >  Article  >  Each disk can have only one directory or multiple directories.

Each disk can have only one directory or multiple directories.

青灯夜游
青灯夜游Original
2022-08-29 14:44:256437browse

There is only one root directory and there can be multiple subdirectories. The disk root directory is the most basic directory of each physical disk, which refers to the upper-level directory of the logical drive. It is relative to the subdirectory; and the subdirectory is a directory in the parent directory. There can also be subdirectories within subdirectories, and there are no restrictions on subdirectories.

Each disk can have only one directory or multiple directories.

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Each disk has only one root directory and can have multiple subdirectories.

What is the disk root directory

The disk root directory is the most basic directory of each physical disk, referring to the logical drive The top-level directory, which is relative to subdirectories. In different file systems, the root directory is represented in different ways. A subdirectory is a directory within the parent directory. There can also be subdirectories within subdirectories, and there are no restrictions on subdirectories.

The disk root directory, root folder, is the most basic directory of each physical disk. In the early days, disk capacity was very small, especially floppy disks, so there was no concept of partitions. Each disk was a large partition, so the root directory of the partition was the root directory of the disk. For the case where the disk has multiple partitions, each partition has its own root directory, so it is obviously not very accurate to mention the root directory of the disk, but everyone is still used to saying that each partition is a disk, such as c disk, so the root directory of each disk is the root directory of each partition.

Expression

The root directory is represented by the character \ in windows (inherited from dos), and in some linux and unix root directories, it is represented by the character /. In some cases Windows also uses / to represent the root directory for compatibility with new operating systems (especially Linux and some future operating systems). For example, the root directory of the first hard disk partition is represented as c:\ in Windows and /dev/hda/ in Linux and Unix.

Each disk can have only one directory or multiple directories.

Absolute path and relative path on disk

Absolute path:Absolute path The path refers to the path where the file actually exists on the hard disk. For example, the file "1.txt" is stored in the "C:\Users\15063\Desktop" directory on the hard disk, then the absolute path of the file "1.txt" is "C:\Users\15063\Desktop\1. txt".

Each disk can have only one directory or multiple directories.

#Relative path: relative to its own target file location. For example, the directory where the "1.htm" file is located is "C:\Users\15063\Desktop\lqf", and the directory where the "1.txt" file is located is "C:\Users\15063\Desktop", then "1.txt" Relative to the "1.htm" file, it is in the upper-level directory of the directory where it is located.

Each disk can have only one directory or multiple directories.

The difference between the two:

①The absolute path is the path where a file actually exists on the hard disk.

② Relative path refers to the location related to its own target file.

③The absolute path means that the folder can be found from this path, whether it is accessed from the outside or internally. The relative path is related to itself, and files and paths in other places can only be accessed internally.

Advantages of absolute paths in network applications:

1. To prevent the website from being maliciously plagiarized, use absolute paths. If someone plagiarizes and collects your content, the links inside will still be there. will point to your website. Some plagiarists are lazy and even copy the links inside.

2. If the webmaster cannot make a 301 redirect and therefore has URL normalization issues, using absolute paths will help the link point to the selected URL version.

3. Even if the web page is moved, the links inside still point to the correct URL.

Disadvantages of absolute paths:

1. Unless the link is dynamically inserted, there is no way to test it on the test server. Because the link inside will point directly to the real domain name URL, not the URL in the test server.

2. Unless the link is dynamically inserted, it will be difficult to move the content page. Because the location of the content page changes, links on other pages may not change accordingly, and still point to the original hard-coded absolute path.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of Each disk can have only one directory or multiple directories.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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