$url = 'http://baidu.com?act_id=12';
$urlQuery = html_entity_decode(parse_url($url)['query']);
parse_str($urlQuery,$param);
var_dump($param);

打印结果:

php获取url参数_html