How to handle different DB based on different config files for each user?
<p>I'm facing a new challenge at work and, as happens to me with all challenges, I'm a bit excited but I stucked a little bit at planning.</p>

<p>We have a CRM solution we are planning to sell to other companies within our servers. That said, I thought that, to avoid having a overpopulated database, we should have separated databases for each company that sign up in the application.</p>

<p>So, every company would have a subdomain like mycompanie.mywonderfullcrm.com and so, that URL points to a folder that should be something like \root_folder\clients\mycompanie\ and within that, it <strong>only</strong> would be the "config" file which then points to the correct database.</p>

<p>From my point of view, that allows to update easily the tool to fix bugs or add new features.</p>

<p>My question is... how could I use core application files with different config files in different folders?</p>
