Php gets parameters on url

how do I get the parameters on the link?

Php
Sep.30,2021

-sharp is the beginning of the anchor tag, which cannot be sent to the backend, but can only be obtained through js and then passed to PHP for processing. The characters guided by


are misspelled. -sharp is followed by a fragment, usually an id name, and ? is followed by GET


reference parse_str method.


nginx is the

that cannot get the hash part.

https://github.com/nginx/ngin.


use: parse_url to get all fields:

$url =' http://username:password@hostname/path?arg=value-sharpanchor';

print_r (parse_url ($url));

)

Array
(

)
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor

)

if you just want to get some fields, you can use GET to get

Menu