好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

PHP防注入的最简单函数使用教程

$_POST = sql_injection($_POST);  

$_GET = sql_injection($_GET);  

function sql_injection($content)

{

if (!get_magic_quotes_gpc()) {

if (is_array($content)) {

foreach ($content as $key=>$value) {

$content[$key] = addslashes($value);

}

} else {

addslashes($content);

}

return $content;

}

查看更多关于PHP防注入的最简单函数使用教程的详细内容...

  阅读:36次