Please help me with multi-applications management. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Please help me with multi-applications management. (/showthread.php?tid=22527) |
Please help me with multi-applications management. - El Forum - 09-12-2009 [eluser]BnoL[/eluser] Hi all, I’m currently managing multi applications with CI: just like: application/prj1 , application/prj2 ... and I have written some new classes (base on CI core classes) and put them in “libraries” folder of each application, ex: “application/prj1/libraries/MY_Controller.php” ... But if I do so, I have to copy my classes to all of my prjs’ folders (prj2,prj3,...), and it’s not good for maintenancing or updating… So I want to put them in a new place so that all prjs can use 1 “libraries”, “helpers”... folder, for example: “application/libraries”, “application/helpers”... My question is: if I do so, what’s the best way to config the core to make it works? or is there any better solutions ? Thanks in advance and sry for my bad English Please help me with multi-applications management. - El Forum - 09-12-2009 [eluser]bretticus[/eluser] Just trying to understand how all this works together. Are you dynamically changing the application path in one index file? Why multiple applications? Please help me with multi-applications management. - El Forum - 09-12-2009 [eluser]BnoL[/eluser] Are you dynamically changing the application path in one index file? No. I'm not. Now, each proj has its own index file. So I have more than 1 index file. Is it possible to dynamically changing the application path in one index file? And how? Why multiple applications? Because I have different projs on 1 site so I want them to use the same CI system. Looking into "Loader.php" => function _ci_load_class, CI use APPPATH to include the file. Code: $subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.EXT; The APPPATH which is defined in the index page is the path to the application. ex: "application/prj1". So I think of defining a new variable to "application" folder only (w/o the proj's name). But I wonder is there any better way to do it? Or anyone has done this before please share your solution. Thanks Please help me with multi-applications management. - El Forum - 09-12-2009 [eluser]bretticus[/eluser] Oh I see... We just do this different. I prefer to have application folders and index files together in their own folders with the system folder in an adjacent folder further up the tree. For example: Code: . Then I change my system_folder variables in my index pages and set my virtual paths to the individual host folders. I know this doesn't solve your dilemma so much though Why not just make your app library folders a symlink that they can all share? |