<p > if (!get_magic_quotes_gpc())<br />
{<br />
safeVar($_GET);<br />
safeVar($_POST);<br />
safeVar($_COOKIE);<br />
}</p>
<p ><span ><span ><span >php过滤非法字符函数</span></span></span></p>
<p >function safeVar(&$data)<br />
{<br />
if (is_array($data))<br />
{<br />
foreach ($data as $key => $value)<br />
{<br />
safeVar($data[$key]);<br />
}<br />
}else{<br />
$data = addslashes($data);<br />
}<br />
}</p>