Return current web path in PHP

Posted by BenTheDesigner on Stack Overflow See other posts from Stack Overflow or by BenTheDesigner
Published on 2010-03-11T19:39:31Z Indexed on 2010/03/11 19:44 UTC
Read the original article Hit count: 156

Filed under:
|

Hi All

Currently developing a PHP framework and have ran into my first problem. I need to be able to drop the framework into any folder on a server, no matter how many folders deep, and need to find that directory to use as a base URL.

For example, it currently works if I put the framework in the root of the server (http://cms.dev/), but if I were to put it in http://cms.dev/folder/ it does not work.

Please advise, any comments welcome.

BenTheDesigner

© Stack Overflow or respective owner

Related posts about php

Related posts about frameworks