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. |