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); //計
相關文章
相關標籤/搜索