假設(shè)我有一個(gè)網(wǎng)址http://www.somepage.com/clicker.php?id_campaign=8&id_email=9324&url=https://www.google.com/search?q=dog&sxsrf=ALeKk019eteEpAwVf2Fk4qYo7TiwhuMQ_Q:1596666153666&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiqzqf3jIXrAhUisaQKHRayBWAQ_AUoAXoECBkQAw&biw=1920&bih=921#imgrc=M4wsJO0A7OQfTM我試圖使用以下代碼獲取參數(shù)id_campaign、id_email和url :$url = htmlspecialchars_decode($url);$parts = parse_url($url);parse_str($parts['query'], $query);當(dāng)打印 $parts['query'] 時(shí)它只給我:https://www.google.com/search?q=dog因?yàn)樗J(rèn)為 url 的其余部分是另一個(gè)參數(shù)...那么如何從 $url 中獲取所有url參數(shù)呢?
url 內(nèi)的 PHP 參數(shù)累積參數(shù)
開(kāi)滿天機(jī)
2023-09-15 18:24:58