php method to turn off automatic escaping: 1. Find and open the php.ini file; 2. Set "magic_quotes_gpc" and "magic_quotes_runtime" to "Off".
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
How to turn off automatic escaping in php?
php automatic escaping
There are two first selections in php.ini to control automatic escaping
magic_quotes_gpc: automatic escaping GET /POST/COOKIES
magic_quotes_runtime: Automatically escape SQL
I found the above problem when using json_decode today. It should be that the All double quotes are added with a slash "\"
By default, these two options are "On", set "Off" to turn them off. If you don't want to modify the configuration, you can use stripcslashes to convert the automatically escaped string. Anti-escape.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to turn off automatic escaping in php. For more information, please follow other related articles on the PHP Chinese website!