使用PHP计算两个路径的相对路径

weihuayu34489 15 0 PDF 2020-12-23 05:12:53

复制代码 代码如下:<html> <body> <?php function relativePath($aPath, $bPath) { $aArr = explode(‘/’, $aPath); //explode函数用于切分字符串,返回切分后的数组,此处用’/’切分字符串 $bArr = explode(‘/’, $bPath); $aDiffToB = array_diff_assoc($aArr, $bAr

用户评论
请输入评论内容
评分:
暂无评论