正则获取域名前缀 | 秋柏先生

正则获取域名前缀

$domain = preg_match(’/(http|ftp|https)://(.*?)/(.*)/’,$_GET[’url’],$result);
$n = preg_match(’/(.*.)?w+.w+$/’, $_SERVER[’HTTP_HOST’], $matches);
print_r(str_replace(".","",$matches[1]));


访问:282次

该文章的评论已关闭