IntroductionIn the field of business, to customer deployment projects, three projects to be integrated together, which results in different data formats, the path of the slash and backslash caused a lot of problems.Check out this information, here
PHP extension text processing -- PCRE regular expression syntax 3 -- escape sequence (backslash) backlash has multiple usage. First, if it is followed by a non-alphanumeric character, it indicates that the special meaning represented by this
Reference symbols protect special metacharacters and parameter extensions in the parser using 3 ways: backslash (\), single quotation mark ('), double quotation mark ("").Single and double quotes must be matched to protect special metacharacters and
Reference symbols protect special metacharacters and parameter extensions in the parser using 3 ways: backslash (\), single quotation mark ('), double quotation mark ("").Single and double quotes must be matched to protect special metacharacters and
Instance
Add a backslash before each double quotation mark ("):
Definition and usage
The Addslashes () function returns a string that adds a backslash before a predefined character.
The predefined characters are:
Single quotation mark (')
Double
What is Magic Quotes
When turned on, all ' (single quotes), "(double quotes), \ (backslash), and NULL characters are automatically added with a backslash to escape. This is exactly the same as the addslashes () function.
A total of three magic
PHP Backslash handler function
Addslashes (): Adds a backslash to some predefined characters in the input string so that the processing is required for database query statements, and so on. These predefined characters are: Single quotes ('), double
Http://yangjunwei.com/a/589.htmlPHP's own library functions Addslashes () and Stripslashes () are string-processing class functions that are the opposite:
Addslashes (): Adds a backslash to some of the predefined characters in the input
Tags: c file path absolute path relative path slash it classification: C and OPENCV1C file path Why use a double slashBecause \ is an escaped leading character in c/c++/c#, for example \ n represents a line break.
If the path has exactly the same
Python itself uses \ to escape some special characters, such as when the quotation marks are added to the string' i\ ' m Superman ' Print (s) # i ' m SupermanIn order to prevent and the string itself to escape the quotation marks, use \ To
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.