3
1
Back

"$host$path/$rel"; function rel2abs($rel, $base) { Various updates, additions /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; } /* dirty absolute URL */ /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n.

New Pull Request