3
1
Back

($rel[0] == '#' || $rel[0] == '?') { return $rel; } extract(parse_url($base)); $path = ''; } /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; } /* 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 (strpos($article["content"], "bonus panel!") !== FALSE) { // And get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { // draw panel.

New Pull Request