21,887
社区成员
发帖
与我相关
我的任务
分享
<?php
$str1 = "E:\Papy\copyP\Web\cpar\common";
$arr = explode("\\",$str1);
$str = '';
$count = count($arr);
for($i=0;$i<$count-1;$i++){
if($i!=4)
$str.=$arr[$i]."\\";
}
$str.=$arr[$count-1];
echo $str;