Home >Backend Development >PHP Tutorial >How to type double quotes. How to prevent single quotes in PHP and how to escape double quotes on the accept page.

How to type double quotes. How to prevent single quotes in PHP and how to escape double quotes on the accept page.

WBOY
WBOYOriginal
2016-07-29 08:38:531312browse

If you do not want the following situation to occur in the PHP page:
Single quotes are escaped as '
Double quotes are escaped as "
Then you can make the following settings to prevent:
Method 1: Set: magic_quotes_gpc = Off in PHP.ini
Method 2: $str=stripcslashes($str)

The above introduces how to type double quotation marks, how to prevent single quotation marks in PHP, and how to set double quotation marks to escape on the accepting page, including how to type double quotation marks. I hope it will be helpful to friends who are interested in PHP tutorials.

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