/**
* @param $url 网址
* @return bool
*/
public static function checkUrl($url){
$pattern="/^(http|https):\/\/.*$/i";
if(preg_match($pattern,$url)){
return true;
}else{
return false;
}
}
PHP正则匹配网址
猜你喜欢
转载自www.cnblogs.com/jiqing9006/p/11972770.html
今日推荐
周排行