距开课0天0时0分-10141782秒
HUANG2021-04-19 10:35:56 0 3 317
[PHP讨论组]举报回复话题 ↕
大佬们
URL链接如下 https://www.baidu.cn/?d&b_scene_zt=1&renqun_youhua=375297
如何获取第一个?后面的参数呢
2
0
分享
对方正在输入.... 2021-09-10 17:27:522楼
$test = parse_url("http://localhost/index.php?name=tank&sex=1#top");print_r($test);
试试
赞 +0添加回复
灭绝师太 2021-04-20 10:11:571楼
试一下
$url = "https://www.baidu.cn/?d&b_scene_zt=1&renqun_youhua=375297";echo parse_url($url)['query'];$str = explode("&",parse_url($url)['query']);
echo '<pre>'.print_r($str,true).'';
这样好复杂啊
对方正在输入.... 2021-09-10 17:27:522楼
$test = parse_url("http://localhost/index.php?name=tank&sex=1#top");print_r($test);
试试
赞 +0添加回复
灭绝师太 2021-04-20 10:11:571楼
试一下
$url = "https://www.baidu.cn/?d&b_scene_zt=1&renqun_youhua=375297";echo parse_url($url)['query'];$str = explode("&",parse_url($url)['query']);
echo '<pre>'.print_r($str,true).'';
赞 +0添加回复