3
1
Back

'#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ /* replace '//' or '/./' or '/foo/../' with '/' */ } function rel2abs($rel, $base) { function.

New Pull Request