Q: Hello, everyone! & nbsp; I think the official information about the filter function is not very clear. I would like to ask you: FILTER_SANITIZE_STRING & nbsp; what special characters does this filter refer to when "remove tags, remove or encode special characters? Which special characters are removed and encoded? Who has specific instructions in this regard? ------ Solution --- ask: Question about the filter function
Hello everyone:
I think the official information about the filter function is not very clear. I would like to ask you:
The FILTER_SANITIZE_STRING filter "removes tags, removes, or encodes special characters". what special characters do they refer? Which special characters are removed and encoded? Who has specific instructions in this regard?
------ Solution --------------------
Mysql_real_escape
------ Solution --------------------
Reference:
I want to filter user input. 1. remove letters, numbers, and other characters except Chinese characters. 2. SQL Injection Prevention. Is there a ready-made filter function available in php?
If 1 is implemented, 2 is implemented.
Assume that you are using UTF-8 encoding.
$ Text = preg_replace ('/\ W/U', '', $ text );