Home > Backend Development > PHP Tutorial > Analysis: php turns off magic quotes magic_quotes_gpc

Analysis: php turns off magic quotes magic_quotes_gpc

WBOY
Release: 2016-07-25 08:57:17
Original
1753 people have browsed it
This article introduces how to turn off magic quotes magic_quotes_gpc in php. Friends in need can refer to it.

In PHP, the magic_quotes_gpc directive can only be turned off at the system level and cannot be turned off at runtime. That is, you cannot use ini_set('magic_quotes_gpc',0); to close it.

If the server segment configuration file cannot be modified, here is another way to use .htaccess to modify the configuration. php_flag magic_quotes_gpc Off But this also has limitations. If apache is run in cgi form and not as a module, it will not work.

In order to better improve portability, just work on the code. Of course, this will bring about a decrease in efficiency. It would be best if the configuration file can be modified.



source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template