📜  php url 解析 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:24.581000             🧑  作者: Mango

代码示例2
//https://www.google.com/search?key=1234
    $url = $_SERVER['REQUEST_URI']; 
    $url_components = parse_url($url); 
    parse_str($url_components['query'], $params); 
    $key = $params['key']; 

// key=1234