: This article mainly introduces php filter slash and other special characters. if you are interested in the PHP Tutorial, please refer to it. Zookeeper
$ ArrFilters = array ("'", "<", ">", "\ x {5c }");
Function IsExistStrings ($ SrcString, $ ArrFilters ){
Foreach ($ ArrFilters as $ key => $ value ){
If (@ preg_match ("/$ value/", $ SrcString )){
Return true;
}
}
Return false;
}
You only need to put the string to be filtered in the $ ArrFilters array. some special characters cannot be expressed or escaped characters, then, you need to enter the ASCII code input method, such as "\ x {5c}" in the array $ ArrFilters, where "5c" is the ASCII code of the slash, and other characters are the same! Unicode codes are also supported.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above section introduces some special characters such as the php filter slash, including some content. I hope to help anyone who is interested in the PHP Tutorial.