Home > Common Problem > The relationship between forward slash and backslash

The relationship between forward slash and backslash

autoload
Release: 2021-03-18 12:45:04
Original
3031 people have browsed it

"/"Forward slash, English is forward slash,

"\" Backslash, English is backward slash

1. Origin of both

In most places, / (slash) is used, including Mac/Linux, and URLs. The only thing you need to remember is that Microsoft uses backslash in its operating system to set itself apart.

2. The use of both

Unix uses slash/ as the path separator, while WebThe application was first used on Unix systems, so currently all network addresses use slash/ as a separator. Windows Since the slash / is used as the parameter mark of the DOS command prompt, in order to avoid confusion, the backslash \ is used as the path separator. Therefore, the current file browsers on Windows systems use backslash \ as the path separator. With development, the DOS system has been eliminated, and the command prompt is rarely used. Slashes and backslashes can be interchanged in most cases without impact.

Small conclusion:

(1) Use forward slash / in the browser address bar URL;

https://www.php.cn/code/33093.html
Copy after login

(2) WindowsUse backslash\ on the file browser;

C:\PerfLogs\Admin
Copy after login

(3) The path that appears in the htm url() attribute, the specified path is the network Path, so forward slash / must be used;

(4) ""/" delimiter, "\" escape character

Recommended: php video tutorial

The above is the detailed content of The relationship between forward slash and backslash. 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