2

Has anyone used this combination and how? kindly explain how can I use PHP Report Maker with CodeIgniter. Thanks.

swatkins
  • 13,530
  • 4
  • 46
  • 78
Developer
  • 21
  • 2

1 Answers1

1

I've not used the PHP Report Maker before but have worked with similar PHP libraries in Codeigniter.

Generally you want to add the class files to your Libraries folder and then you can load them as you would normally:

$this->load->library('phpreportmaker');

Sometimes, if an external library is made up of a set of classes in different files it's nice to write a separate library that uses PHP's include(); to load them all. Then you can just load that library in your controllers/models. This is kind of a "wrapper" if you like for Codeigniter.

It's also nice to put the bulk of the interaction with the external library in your new wrapper to keep your Controllers and Models clean and duplicate code free. If you need to update the external library files you can do so easily, just editing your new library wrapper.

I wrote a similar answer here - Integrate phpgrid with codeigniter that explains in more detail how I normally use external libraries in Codeigniter.

Community
  • 1
  • 1
jimbo2087
  • 1,034
  • 8
  • 20