Desactivar Magic Quotes sin modificar php.ini


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # TURN OF MAGIC QUOTES
  2. function traverse ( &$arr ){
  3. if ( !is_array ( $arr ) ) return;
  4. foreach ( $arr as $key => $val )
  5. is_array ( $arr[$key] ) ? traverse ( $arr[$key] ) : ( $arr[$key] = stripslashes ( $arr[$key] ));
  6. }
  7. $gpc = array ( &$_GET, &$_POST, &$_COOKIE, &$_REQUEST );
  8. traverse ( $gpc );
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.