Change working webroot to a subfolder of the current webroot

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
stevieSky
Forum Newbie
Posts: 10
Joined: Wed Apr 26, 2006 4:18 pm

Change working webroot to a subfolder of the current webroot

Post by stevieSky »

I am guessing this is not possible but if someone out there knows a way they would be great!!!

Currently in a software app i am developing i have a number of folders at the root folder1,folder2


html(webroot)
.-----login/login.sm
.
.-----folder1
.
.-----folder2
.
.-----folder3
.


at the moment a client logs in(login.sm) and is directed to folder 1 which uses classes in folder2,folder3 etc

What i want to do is now allow depending on the client to use different versions of my software without having to change all the code to include a new level as follows

.-----login/login.sm
.
.-----version1.------folder1
.
__________.------folder2
.
__________.------folder3
.
.
.-----version2.------folder1
.
........



Is it possible to change the webroot from 'html' to 'version1' or 'version 2' depending on what version the client uses in login.sm

I would greatly appreciate anyone that could give me some solution to this as i have spent a long time trying to get a work around
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If the code is written correctly, it shouldn't matter where the root folder is. It sounds like you didn't write the code in this manner so it could be more difficult. Unfortunately, it's hard to say without understanding how the code is written right now.
Post Reply