What is the method for php to turn off automatic escape
This article mainly introduces "what is the method of php turning off automatic escape". In daily operation, I believe that many people have doubts about the method of php turning off automatic escape. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "what is the method of php turning off automatic escape?" Next, please follow the editor to study!
Find and open the php.ini file.
2. Set "magic_quotes_gpc" and "magic_quotes_runtime" to "Off".
There are two pre-selected controls for automatic escape in php.ini
Magic_quotes_gpc: automatically escapes GET/POST/COOKIES
Magic_quotes_runtime: automatically escapes SQL
I found the above problem when using json_decode today. I should add a slash "\" to all the double quotes in the json.
By default, these two options are "On", set "Off" to turn it off, and if you don't want to modify the configuration, you can use stripcslashes to reverse escape the automatically escaped string.
At this point, the study on "what is the method of php turning off automatic escape" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!