The function adds an escape character, the backslash, , before certain potentially dangerous characters in a string passed in to the function. The characters escaped are
x00,
,
, , ', " and x1a.
This can help prevent SQL injection attacks which are often performed by using the ' character to append malicious code to an SQL query.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…