Solution:
1) turn off magic_quotes_gpc in php.ini.
2)
<?php
if (get_magic_quotes_gpc()) {
function strip_quotes(&$var) {
if (is_array($var) {
array_walk($var, 'strip_quotes');
} else {
$var = stripslashes($var);
}
}
// Handle GPC
foreach (array('GET','POST','COOKIE') as $v) {
if (!empty(${"_".$v})) {
array_walk(${"_".$v}, 'strip_quotes');
}
}
}
?>
Комментариев нет:
Отправить комментарий