We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

nicolaspar on 01/03/07


Tagged


Versions (?)


PHP - Desactivar Magic Quotes sin modificar php.ini (PHP)


Published in: PHP 


  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 

You need to login to post a comment.