使用php中的#等任意参数获取当前url


get the current url with any parameter like # in php

我希望我的当前页面url在php我的页面没有查询字符串像

e.g http://example.com/questions/ask/#/shop/12/67777

我得到http://example.com/questions/ask/,但从# url是打破

浏览器不向服务器发送#后的URL数据,只有使用客户端(认为是一个链接)。但你可以使用Javascript来获得这些(与location.hash)。