判断链接开头是否是
https://
http://
//
if(preg_match('/^(https:\/\/|http:\/\/|\/\/)[^\s]+/', $str)!=1){ //是 }else{ //否 }