Lines Matching refs:p1
81 function pfc_RelativePath($p1, $p2) argument
83 if (is_file($p1)) $p1 = dirname($p1);
86 $p1 = realpath(cleanPath($p1));
91 while( $p1 != "" &&
92 $p1 != "/" && // for unix root dir
93 !preg_match("/^[a-z]\:\\\$/i",$p1) && // for windows rootdir
94 strpos($p2, $p1) !== 0)
97 $p1 = dirname($p1);
100 $p2 = str_replace("\\","/",substr($p2, strlen($p1)+1, strlen($p2)-strlen($p1)));
102 if ($p1 === "/" || $p1 === "") {
103 $p2 = substr($p2, strlen($p1));
105 $p2 = substr($p2, strlen($p1)+1);