代码如下:
<?php
$url = "/SRRSH_PROJECT/admin/controller.php?type=progress&action=list&page=2&page=3";
$url = substr_replace($url,'',61);
echo $url;
?>
但是这样写却不生效
<?php
$url = "/SRRSH_PROJECT/admin/controller.php?type=progress&action=list&page=2&page=3";
function replaceUrl($url){
$url = substr_replace($url,'',61);
}
replaceUrl($url);
echo $url;
?>