0

guys... I've this situation: I'm creating a system where will run multiple projects using the same application folder. Something like this:
project1 ==> newApplicationFolder
project2 ==> newApplicationFolder
(...) projectN ==> newApplicationFolder

I need use this way, cause the projectN folders will have just the index and some configurations, like the sqlite database. And, that's the point: the projectN folders will be named by the user, so, i've not a static folder to indicate in the database.php. Any idea to how I could to do?
It's possible extends the config file, or create a personalized config file inside the projectN folder?

Thanks

Vernon
  • 1
  • 1
  • The config files are just bog standard PHP files containing arrays. If all you want to do is change, for example, the database name simply run a query (using a native PHP connection) against your database in the database config file itself and connect to the correct database as per the domain/sub domain/uri. – James Walker Dec 16 '15 at 11:53
  • hmmm.... I hadn't think in this way... i'll try and return soon. – Vernon Dec 16 '15 at 12:10
  • returning... I think would not work... think with me: the database is custom by the projectN, and the index is not in the same structure that the application folder; plus, other project would need to use the same structure. Could I create an array for database in the custom folder, calling him in the index file, in the each project? – Vernon Dec 16 '15 at 12:12
  • I've being some success creating an array file with the new database config and including it in the model classes. Now i'm trying the the db name by parameter. – Vernon Dec 16 '15 at 12:45
  • try with hmvc in ci... – Niranjan N Raju Dec 16 '15 at 14:22

0 Answers0