note 93492 added to function.get-magic-quotes-gpc

From: Date: Sat, 12 Sep 2009 20:12:50 +0000
Subject: note 93492 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-160495@lists.php.net to get a copy of this message
Use the following to bypass magic quotes: // If magic-quotes is enabled, strip out slashes if ( get_magic_quotes_gpc ( ) ) { // function for removing slashes in arrays and strings if ( ! function_exists ( 'stripslashes_deep' ) ) { function stripslashes_deep ( $value ) { return ( is_array ( $value ) ? array_map ( 'stripslashes_deep', $value ) : stripslashes ( $value ) ) ; } } $_GET = array_map ( 'stripslashes_deep', $_GET ) ; $_POST = array_map ( 'stripslashes_deep', $_POST ) ; $_COOKIE = array_map ( 'stripslashes_deep', $_COOKIE ) ; $_REQUEST = array_map ( 'stripslashes_deep', $_REQUEST ) ; } ---- Server IP: 217.160.72.57 Probable Submitter: 217.85.191.32 ---- Manual Page -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Edit -- https://master.php.net/note/edit/93492 Del: integrated -- https://master.php.net/note/delete/93492/integrated Del: useless -- https://master.php.net/note/delete/93492/useless Del: bad code -- https://master.php.net/note/delete/93492/bad+code Del: spam -- https://master.php.net/note/delete/93492/spam Del: non-english -- https://master.php.net/note/delete/93492/non-english Del: in docs -- https://master.php.net/note/delete/93492/in+docs Del: other reasons-- https://master.php.net/note/delete/93492 Reject -- https://master.php.net/note/reject/93492 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160495) next »