function relativePath($aPath, $bPath) { $aArr = explode('/', $aPath); //explode函數(shù)用于切分字符串,返回切分后的數(shù)組,此處用'/'切分字符串 $bArr = explode('/', $bPath); $aDiffToB = array_diff_assoc($aArr, $bArr); //array_diff_assoc()用于獲取A數(shù)組與B數(shù)組之間元素的差集,Key和Val...
www.dbjr.com.cn/article/384...htm 2025-5-29