Welcome Guest, Not a member yet? Register   Sign In
Accessing an Independent Application from Withing a CodeIgniter Application.
#2

The answers to your questions are more or less based on the code of your other project, not on CodeIgniter, though I can say that for #1, there's almost no benefit to putting something in the root folder of your CodeIgniter project.

In most cases, if I want to integrate an external PHP library or application with CI without doing some heavy modification of the library/application, I put it in the /application/third_party/ directory and write a library (in /application/libraries/) to interface my CI application to the external library/application. The exception would be if I could auto-load the library with Composer, in which case I would do that instead of putting it in the /application/third_party directory.

In some cases, you could put the library/application in your /application/libraries directory. The loader is pretty forgiving when you load libraries, but there are certainly cases in which this can cause more problems than it's worth.

#2 and 3 are not likely to be answerable without more information about the database resource and how you expect to access it. Additionally, a "vanilla PHP" application, especially from several years ago, could mean a lot of different things. The easiest way to get it to work with your CRM would probably be to refactor it into a CodeIgniter library or controller, or setup a controller and/or library to interface with it. Once you have something like that working, you could take your time refactoring the rest of it into your CI application.
Reply


Messages In This Thread
RE: Accessing an Independent Application from Withing a CodeIgniter Application. - by mwhitney - 07-15-2016, 02:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB