转义字符

1、htmlspecialchars() 转义特别的字符为HTML实体;

'&' (ampersand) becomes '&'
'"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
''' (single quote) becomes ''' only when ENT_QUOTES is set.
'<' (less than) becomes '&lt;'
'>' (greater than) becomes '&gt;'

你可能感兴趣的:(转义字符)