2015
09-17
09-17
PHP防XSS 防SQL注入的代码
functiongjj($str){$farr=array("/\\s+/","/<(\\/?)(script|i?frame|style|html|body|title|link|meta|object|\\?|\\%)([^>]*?)>/isU","/(<[^>]*)on[a-zA-Z]+\s*=([^>]*>)/isU",);$str=preg_replace($farr,"",$str);returnaddslashes($str);}functionhg_input_bb($array){if(is_array($array)){foreach($arrayAS$k=>$v){$array[$k]=h...
继续阅读 >