PHP 算出两个文件的相对路径?

$a = ‘/a/b/c/d/e.php’; $b = ‘/a/b/12/34/c.php’;php function getRelativePath($file1,$file2){ //分别对两个文件路径进行分割 $file1_arr = explode('/', $file1); $file2_arr = explode('/', $file2); //计
相关文章
相关标签/搜索