在 PHP 中获取包含查询字符串的当前 URL 路径
我需要从当前请求的 URL 中获取路径。例如,如果当前网址为:
"http://www.example.com/example/test/hi.php?randomvariable=1"
我想要这个:
"/example/test/hi.php?randomvariable=1"
我需要从当前请求的 URL 中获取路径。例如,如果当前网址为:
"http://www.example.com/example/test/hi.php?randomvariable=1"
我想要这个:
"/example/test/hi.php?randomvariable=1"