Blog Archive

0

How to get root URL in php?

How to get root URL in php? 5 Answers $root = (! $parsedUrl = parse_url(‘http://localhost/some/folder/containing/something/here/or/there’); $root = $parsedUrl[‘scheme’] . $url = ‘http://user:pass@localhost:80/some/folder/containing/something/here/or/there’; […]