sharing library between Multiple Applications with one CodeIgniter Installation |
before version 3.0.0/3.0.1 i could share a library between all my "Multiple Applications with one CodeIgniter Installation", by putting the library file in the system/libraries folder, but with this new version update, i get the error
An Error Was Encountered Non-existent class: CI_Formsclass ps: formclass is the name of the library please can anyone help me achieve this since the codeigniter team decided to remove the feature thank you.
https://github.com/ivantcholakov/starter...-edition-4
Put the shared library here: https://github.com/ivantcholakov/starter.../libraries
You shouldn't put anything in the `system` folders. Leave that for CodeIgniter otherwise your changes will get overwritten whenever you upgrade the CI core.
Instead, for common libraries, create a new folder, and add that folder as a Package in both of your applications. You can have this path autoloaded by adding it to the autoload.php config file. By default it will load APPPATH/third_party but you can always replace that if you don't use it. Code: $autoload['packages'] = array(FCPATH.'common'); (09-04-2015, 07:10 AM)kilishan Wrote: You shouldn't put anything in the `system` folders. Leave that for CodeIgniter otherwise your changes will get overwritten whenever you upgrade the CI core.Thanks for the feedback, i tried it but it didn't work (09-04-2015, 04:52 PM)kendysond Wrote: Thanks for the feedback, i tried it but it didn't work It's always helpful to provide more details on exactly what you did that didn't work. Otherwise, we don't have any idea how to help you. I just ran through the process and did the following:
When I visited the site, it died with the "Found it!" text on the screen as expected. (09-04-2015, 07:40 PM)kilishan Wrote:(09-04-2015, 04:52 PM)kendysond Wrote: Thanks for the feedback, i tried it but it didn't work OMG!!!!!!! ???? ?????I'm just seeing this now, i just tried and it worked like a charm, i deeply appreciate Sir!!!!!! i used "substr(BASEPATH,0,-7)" instead of FCPATH though, this means alot Sir, Have a great Day! |
Welcome Guest, Not a member yet? Register Sign In |