📜  部分 url php 代码示例

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

代码示例1
//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