Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function resolve_rurl($url)
- {
- $url = explode("/", $url);
- foreach ($url as $key => $part)
- {
- if ($part == '..')
- {
- unset($url[$key]);
- unset($url[$key - 1]);
- }
- else if ($part == '.')
- {
- unset($url[$key]);
- }
- }
- return implode("/", $url);
- }
Advertisement
Add Comment
Please, Sign In to add comment