//替换GET参数(PHP代码函数)
//代码来源:Monxin ./config/functions.php
function replace_get($key,$v){
$url=GetCurUrl();
$temp=explode("&",$url);
if(count($temp)==1){
$symbol="?";
$temp=explode("?",$url);
if(count($temp)==1){return $url."?".$key."=".urlencode($v);}
}else{
$symbol="&";
}
$url='';
for($i=0;$i<count($temp);$i++){
$temp2=explode("=",$temp[$i]);
if($temp2[0]!=$key){$url.=$temp[$i].$symbol;}
}
$url=trim($url,$symbol);
$url.="&".$key."=".urlencode($v);
return $url;
}
替换GET参数(PHP代码函数)
最新推荐文章于 2021-04-15 04:25:19 发布