我需要构建一个从URL解析域的函数.
所以,随着
http://google.com/dhasjkdas/sadsdds/sdda/sdads.html
要么
http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html
它应该回来 google.com
google.com
同
http://google.co.uk/dhasjkdas/sadsdds/sdda/sdads.html
它应该回来google.co.uk.
google.co.uk
php
php ×1