The main content of this section is relatively simple, that is, to remove unnecessary backslashes.
In fact, this is a legacy of the past, PHP in order to facilitate beginners to join the content, but later found that it caused more problems, and in today's language has been abandoned
This feature has been DEPRECATED as of PHP 5.3.0 and removed as of PHP 5.4.0.
Extended reading: http://php.net/manual/en/security.magicquotes.php (official manual)
Just know two ways to close the MAGIC_QUOTES_GPC.
The first method: Create a new text file, enter the following, and then save As. ". Htacess" is then saved in the site root folder. (This method only applies to Apach)
Php_flag MAGIC_QUOTE_GPC off
The second method: Create a new file named Remove_quotes.php, enter the following, and then require the first part of the PHP file where you want to remove the backslash.
1<?PHP2 if(GET_MAGIC_QUOTES_GPC()) {3 $process=Array(&$_get, &$_post, &$_cookie, &$_request);4 while(List($key,$val) = each($process)) {5 foreach($val as $k=$v) {6 unset($process[$key][$k]);7 if(Is_array($v)) {8 $process[$key][stripslashes($k)] =$v;9 $process[] = &$process[$key][stripslashes($k)];Ten}Else { One $process[$key][stripslashes($k)] =stripslashes($v); A } - } - } the unset($process); - } -?>
Send form content in PHP email (2)-How do I remove unnecessary backslashes? (MAGIC_QUOTES_GPC)