terryds Posted June 4, 2013 Share Posted June 4, 2013 I found a PHP snippet that will reverse the magic quotesThis is the snippet <?phpif (get_magic_quotes_gpc()){ $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process);} And, i heard that magic quote is removed as of PHP 5.4. Is it still needed to put if i use PHP 5.4 ? Link to comment Share on other sites More sharing options...
jeffman Posted June 4, 2013 Share Posted June 4, 2013 If you look up the function in the manual, you will read this: Always returns FALSE because the magic quotes feature was removed from PHP.So, if the function always returns false, that code will never be executed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now