3
1
Back

$rel; for ($n = 1; $n > 0; $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } /* absolute URL is ready! */ } function rel2abs($rel, $base) { if ($title_text == $article['title'] || strpos($article['title'], $title_text) !== false){ // there's an arrow shaped hole you can use this, for instance, if you want to dig into the gate input.

New Pull Request