php判断url地址是否有http或者https,如果有则去掉http或者https
$source = 'https://www.hvzhan.com';
if (preg_match('/(http:\/\/)|(https:\/\/)/i', $source)) {
$source = preg_replace('/(http:\/\/)|(https:\/\/)/i', '', $source);
// 去掉 h t t p: //和 h t t ps: //前缀
echo $source;exit;
}