In PHP, addslashes () and stripslashes () are used for string conversion and restoration. Examples of character string conversion and restoration using addslashes () and stripslashes () in PHP. Examples of this article describe the use of escape
This article mainly introduces the differences between PHP stripslashes and addslashes, sharing the convenience of friends.
When we write data to MySQL, for example: The code is as follows: mysql_query ("Update table set ' title ' = ' Kuhanzhu ' s
In PHP we often use stripslashes and addslashes, let me explain in detail the stripslashes and addslashes use of the difference between them.
Addslashes
The Addslashes () function adds a backslash before the specified predefined character.
These
In php, we often use stripslashes and addslashes. next I will introduce the differences between stripslashes and addslashes in detail. The addslashes and addslashes () functions add a backslash before the specified predefined characters.
In php, we
The function of the addslashes () function and the stripslashes () function in PHP and some usage are described earlier in this article to introduce PHP
stripslashes () function and addslashes () functionThe difference.
they differ from the
In php, the addslashes () function adds a backslash before some predefined characters in the input string. the stripslashes () function deletes the backslash added by the addslashes () function. This article summarizes some usage and examples of
This article mainly introduces the difference between PHP stripslashes and addslashes, sharing the convenience needs of friends. When we write data to MySQL, for example: The code is as follows: mysql_query ("Update table set ' title ' = '
PHP for security, so introduced a MAGIC_QUOTES_GPC = on function, you can directly put single quotation marks into the database without any processing, then for off, you need to consider the problem of single quotes, rather than blindly trust the
In php, we often use stripslashes and addslashes. Next I will introduce the differences between stripslashes and addslashes in detail.
Addslashes
The addslashes () function adds a backslash before the specified predefined character.
The predefined
PHP addslashes () and Stripslashes () implement string escape and restore usages, use of escape characters
Examples in this article describe the use of addslashes () and stripslashes () in PHP for string escaping and restoration. Share to everyone
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.