All pastes #607397 Raw Edit

Example for undoing magic quotes

public php v1 · immutable
·published 2007-07-07 15:58 UTC
rendered paste body
<?phpif (ini_get('magic_quotes_gpc')) {	stripRec (array($_POST, $_GET, $_REQUEST));}function stripRec(array &$ar) {	foreach ($ar as &$el) {		if (is_array($el)) {			stripRec($el);		} else {			$el = stripslashes($el);		}	}}?>