How to get parameters from a URL string?

前端 未结 13 1485
孤城傲影
孤城傲影 2020-11-22 04:05

I have a HTML form field $_POST[\"url\"] having some URL strings as the value. Example values are:

https://example.com/test/1234?email=xyz@test.com
         


        
13条回答
  •  梦毁少年i
    2020-11-22 04:34

    $uri = $_SERVER["REQUEST_URI"];
    $uriArray = explode('/', $uri);
    $page_url = $uriArray[1];
    $page_url2 = $uriArray[2];
    echo $page_url; <- see the value
    

    This is working great for me using php

提交回复
热议问题