Welcome Guest, Not a member yet? Register   Sign In
quick question about the config file & class
#1

[eluser]Unknown[/eluser]
i'm about to start a new project and i was wondering the feasibility of this:

i'm looking to offer a hosted solution on the app i'm building in a similar manner to some of the 37signals apps.

i'm thinking about dynamically changing the config file (specifically to change the database and site url) based on the subdomain (i.e., server1.mysite.com switches the db to server1, myserver.mysite.com switches the db to myserver, etc.)?

is that feasible, and if so, where would the best place to put the switching code? or is there a better way of doing it? i'm trying not to just have to make a different copy of the application and put it in different folders.




Theme © iAndrew 2016 - Forum software by © MyBB