本文实例总结了PHP常用工具函数。分享给大家供大家参考,具体如下:
移除XSS攻击脚本
function RemoveXSS($val) {
// remove all non-printable characters. CR(0a) and LF(0b) and TAB(9) are allowed
// this prevents some character re-spacing such as <java>
// note that you have to handle splits with \n, \r, and \t later sinc