来自专业的译者、企业、网页和免费的翻译库。
a domain név: php.net
/ / get host name from url preg_match( "/ ^(http:\ / \/) ?([^\ / ]+) / i", "http: / /www.php.net / index.html", $matches); $host = $matches[2]; / / get last two segments of host name preg_match(" / [^\.\ / ]+\ .[^\.\ / ]+$ / ",$host,$matches); echo "domain name is: ".$matches[0] ."\n";