扫码关注官方订阅号
大佬们
URL链接如下 https://www.baidu.cn/?d&b_scene_zt=1&renqun_youhua=375297
如何获取第一个?后面的参数呢
$test = parse_url("http://localhost/index.php?name=tank&sex=1#top");print_r($test);
试试
试一下
$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).'';
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
$test = parse_url("http://localhost/index.php?name=tank&sex=1#top");print_r($test);
试试
试一下
$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).'';