2016年4月20日

php防sql注入函数

摘要: function clean($str){ $str=trim($str); $str=strip_tags($str); $str=stripslashes($str); $str=addslashes($str); $str=rawurldecode($str); $str=quotemeta( 阅读全文

posted @ 2016-04-20 19:05 飞羽哥哥 阅读(709) 评论(0) 推荐(0) 编辑

常用的正则检测总结

摘要: 常用的正则验证 1.验证是否为手机号格式 /^0?1[3|4|5|8][0-9]\d{8}$/; 2.整数格式 /^(0|[1-9]/d*)$/; 3.小数格式 /^(0|[1-9]/d*)/.(/d+)$/; 4.只能输入数字和字母 /^([a-z]|[A-Z]|[0-9]){8}$/ 5.排除全 阅读全文

posted @ 2016-04-20 18:59 飞羽哥哥 阅读(276) 评论(0) 推荐(0) 编辑

导航