3
1
Back

$base if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return 2; } /* absolute URL */ /* replace '//' or '/./' or '/foo/../' with '/' */ } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array( '#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#' ); for ($n = 1; // [0:No, 1:Yes.

New Pull Request