function quotesGPC()
{
$_POST = array_map( "addSlash", $_POST );
$_GET = array_map( "addSlash", $_GET );
$_COOKIE = array_map( "addSlash", $_COOKIE );
}
function addSlash( $el )
{
if( is_array( $el ) )
return array_map( "addSlash", $el );
else
return addslashes( $el );
}if( !get_magic_quotes_gpc() )
quotesGPC();
{
$_POST = array_map( "addSlash", $_POST );
$_GET = array_map( "addSlash", $_GET );
$_COOKIE = array_map( "addSlash", $_COOKIE );
}
function addSlash( $el )
{
if( is_array( $el ) )
return array_map( "addSlash", $el );
else
return addslashes( $el );
}if( !get_magic_quotes_gpc() )
quotesGPC();
- SQL Injection
- XSS
- System global variable pollution
数值型的 $i=0+$i;
字符型的 mysql_escape_string 转义掉
mysql 所有查询 变量 加上''#PHP.ini中
safe_mode = On
display_errors=off
magic_quotes_gpc=On这样应该是无法注入了.
呵呵,还望高手指正.
如何用?谁提示一下?