Forum Moderators: coopster

Message Too Old, No Replies

Automatic Inclusion?

Or require any call

         

kkonline

11:32 am on Aug 19, 2007 (gmt 0)

10+ Year Member



If i include the snippet written below in beginning of a php file will it do it's task or is there any need to call it to implement?

if (get_magic_quotes_gpc()) {
function strip_gpc_slashes(&$array) {
if (!is_array($array)) {
return;
} foreach ($array as $key => $val) {
is_array($array[$key])? strip_gpc_slashes($array[$key]) : ($array[$key] = stripslashes($val));
}
}

$gpc = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST, &$_FILES);
strip_gpc_slashes($gpc);
}

Habtom

11:42 am on Aug 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



:) The last line strip_gpc_slashes($gpc); is calling the function, so you don't need to do anything on it.