@H_502_5@
string MysqL_real_escape_string ( string $unescaped_string [,resource $link_identifier ] )
MysqL_real_escape_string()
calls MySQL‘s library function MysqL_real_escape_string,which prepends backslashes to the following characters: \x00,\n,\r,\,‘,” and \x1a.@H_502_12@
@H_502_5@
string addslashes ( string $str )
Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote (‘),double quote (“),backslash (\) and NUL (the NULL byte).@H_502_12@
它们影响不同的角色. MysqL_real_escape_string是特定于MysqL的. Addslashes只是一个通用的功能,可能适用于其他的东西以及MysqL.@H_502_12@