/**
* 判断是否包含http
*/
function ishttp($source, $replace = false) {
if (preg_match('/(http:\/\/)|(https:\/\/)/i', $source)) {
if($replace) {
$source = preg_replace('/(http:\/\/)|(https:\/\/)/i', '', $source);
return $source;
}
return true;
}
return false;
}