PHP Get URL with Parameter

后端 未结 5 1053
迷失自我
迷失自我 2021-02-01 15:45

I want to get a URL and its parameters. Example:

www.someweb.com/somepage.php?id=10

How to get only

5条回答
  •  情话喂你
    2021-02-01 16:13

    Finally found this method:

    basename($_SERVER['REQUEST_URI']);
    

    This will return all URLs with page name. (e.g.: index.php?id=1&name=rr&class=10).

提交回复
热议问题