<?php
$src = "http://www.baidu.com?u1=us&u2=hui";
$query = parse_url($src,PHP_URL_QUERY);
parse_str($query,$params);
$test = $params['u2'];
echo $test;
?>
<?php
$src = "http://www.baidu.com?u1=us&u2=hui";
$query = parse_url($src,PHP_URL_QUERY);
parse_str($query,$params);
$test = $params['u2'];
echo $test;
?>
本文标题:2018-04-20获取网页url的参数值
本文链接:https://www.haomeiwen.com/subject/rsazkftx.html
网友评论