标签: php url
我想获取当前页面网址,包括#
示例:<link rel="dns-prefetch" href="//example.com">
<link rel="dns-prefetch" href="//example.com">
如果我使用example.com#yes,我只会得到http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],但我还需要完整的example.com
example.com#yes
http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
example.com