更新时间:2023-02-23 17:21:20
You can take the second step and parse the query string using parse_str.
$url = 'www.domain.org?x=1&y=2&z=3';
$url_parts = parse_url($url);
parse_str($url_parts['query'], $query_parts);
var_dump($query_parts);
我认为您的意思是查询字符串而不是片段,因为片段没有标准模式.
I assumed you meant the query string instead of the fragment because there isn't a standard pattern for fragments.