Hi all,
I'm building a CMS on a SaaS principle. I have my webserver (dynamic dedicated) up and running. It's all going like expected, but now I've come across my templating system, and later on simple things such as filehandling. Logically, each client has an own hostingaccount. All the hostingaccounts will be requesting to the masterdatabase, hosted on a large, global account, at the same server.
Some things which need to be handled later on are simple things as filehandling. Typically each client will store his/her own data at his/her own hostingaccount. Only the pagedata, and other data (productcatalogue, surveys, etc etc) will be hosted in the database.
But before I'm able to upload files from the centrally hosted system, I need to figure out how to get to the specified hostingaccount. I've got all the data I need stored in a sessionvariable which is filled when the client selects his/her website to work with (because my system supports mutliple sites).
The urlstructure on my server is like:
/home/[unix-user-name]/domains/[domain-name]/public_html/paths/to/the/folders/i/set/up/
The second part in the url is the hostingaccountname, and the fourth part is de domain from the client. Again, I have this info in a session variable, ready for access.
My only problem is, when the client is logged on to the system, a part of the base url is allready filled like this:
/home/ontdek01/domains/ontdek5.nl/public_html/
My question, how can i force PHP to start looking for files from the very root, in this case home
.
I hope my question is clear. Thanks in advance for spending time and putting effort in helping me further!
Ben