<?php function clear_urlcan($url){ $rstr=''; $tmparr=parse_url($url); $rstr=empty($tmparr['scheme'])?'https://':$tmparr['scheme'].'://'; $rstr.=$tmparr['host'].$tmparr['path']; return $rstr; } ?>
博客列表 >去除url中参数,保留干净Url
<?php function clear_urlcan($url){ $rstr=''; $tmparr=parse_url($url); $rstr=empty($tmparr['scheme'])?'https://':$tmparr['scheme'].'://'; $rstr.=$tmparr['host'].$tmparr['path']; return $rstr; } ?>