function convertUrlQuery($url) {
$query = parse_url($url, PHP_URL_QUERY);
$queryParts = explode('&', $query);
$params = array();
foreach ($queryParts as $param) {
$item = explode('=', $param);
if ($item[0] == "id"){
return $item[1];
}
//$params[$item[0]] = $item[1];
}
return "";//$params;
}
print_r(convertUrlQuery(''));
?>
阅读(958) | 评论(0) | 转发(0) |