function compare($ph2,$ph3){
$ret = '';
$_f1Arr = explode("/",$ph2);
$_f2Arr = explode("/",$ph3);
$f1 = array_pop($_f1Arr);
$f2 = array_pop($_f2Arr);
for($i=0;$i
break;
}
for($j= $i-1;$j
}
for($i-1;$i
}
return $ret.$f2;
}
$file1 = "aaa/ddd/ccc/ddd/test/a.js";
$file2 = "aaa/ddd/ccc/ddd/test/b.js";
echo compare($file1,$file2);
?>
上一篇:如何使用PHP可变函数