Get base root

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
oleg
Forum Newbie
Posts: 6
Joined: Thu Aug 28, 2008 2:51 am

Get base root

Post by oleg »

I'm trying to access to the common path but I dont know if there is a way to do it.
I have several pages with the sentence "include <url>" and I want to make them accesible from every page inside every folder.

An include file might contain other include files.

The thing is, if my base path is "/usr/subdomain/myweb" and I have this folders
/usr/subdomain/myweb/admin
/usr/subdomain/myweb/classes
how can I get the base path inside a file that is included in a file in admin?
I know that i can use "../" but this doesnt work if i try to include the file form a file in the base path.

Thanks in advance if someone can translate this mess and answer.
Post Reply