Get root folder without domain

Sometimes when developing my theme my WordPress website will be on a obscure domain such as http://localhost:8080/project/foo/bar.

Is there a WordPress API function (or maybe just a PHP function) to get the root folder without the domain? So I am looking for a function that will give me /project/foo/bar without the http://localhost:8080 part.

Read more here:: Get root folder without domain

Leave a Reply

Your email address will not be published. Required fields are marked *