Can someone shed some light on the differences between these 2 functions, from the PHP manual:
addslashes
:
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).
mysql_real_escape_string
:
mysql_real_escape_string()
calls MySQL's library function mysql_real_escape_string
, which prepends backslashes to the following characters: x00,
,
, , ', " and x1a.
From what I gather the major difference is x00,
x1a which addslashes
doesn't escape, can you tell me what the significance of that is?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…