【发布时间】:2013-04-18 09:43:57
【问题描述】:
我需要从当前请求的 URL 中获取路径。例如,如果当前 URL 是:
"http://www.example.com/example/test/hi.php?randomvariable=1"
我想要这个:
"/example/test/hi.php?randomvariable=1"
【问题讨论】:
-
您同时要求路径和查询字符串,但是搜索如何找到路径的人最终会出现在这里。你能把标题改成“在 PHP 中使用查询字符串获取当前 URL 路径”吗?