本文实例讲述了php常用表单验证类用法。分享给大家供大家参考。具体如下:
<"/^[a-zA-Z0-9]{".$num1.",".$num2."}$/",$str))"/^[0-9]{".$num1.",".$num2."}$/i",$str))"/^[\xa0-\xff]{1,4}$/", $string); return (preg_match("/^([\x81-\xfe][\x40-\xfe]){".$num1.",".$num2."}$/",$str))"/^((\(\d{3}\))|(\d{3}\-))",$str))"/^[1-9]\d{5}$/",$str))"/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\"\"])*$/",$str))" "," ",$data[$k1][$k2]); $data[$k1][$k2]=str_replace("\n","<br>\n",$data[$k1][$k2]); } } else { $data[$k1]=nl2br(htmlspecialchars($data[$k1])); $data[$k1]=str_replace(" "," ",$data[$k1]); $data[$k1]=str_replace("\n","<br>\n",$data[$k1]); } } } else { $data=nl2br(htmlspecialchars($data)); $data=str_replace(" "," ",$data); $data=str_replace("\n","<br>\n",$data); } Return $data; } } ?>
希望本文所述对大家的php程序设计有所帮助。
标签:
php,表单,验证类
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“php常用表单验证类用法实例”评论...