Skip to content

Instantly share code, notes, and snippets.

@pwlin
Created May 17, 2010 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwlin/404048 to your computer and use it in GitHub Desktop.
Save pwlin/404048 to your computer and use it in GitHub Desktop.
<?php
private function disable_magic_quotes(){
if(ini_get('magic_quotes_gpc')){
function strip_all_params(&$item){ $item = stripslashes($item); }
array_walk_recursive($_GET,'strip_all_params');
array_walk_recursive($_POST,'strip_all_params');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment