function is_url(http://pic3.phprm.com/2012/10/12/$str.jpg){ return preg_match("/^http://[A-Za-z0-9]+.[A-Za-z0-9]+[/=?%-&_~`@[]':+!]*([^"])*$/", $str); }
3. 判断手机号码:
代码如下
复制代码
function is_mobile($str){ return preg_match("/^(((d{3}))|(d{3}-))?13d{9}$/", $str); }
永久链接:
转载随意!带上文章地址吧。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn