• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load a class in CodeIgniter

#1
Hello Community,

I am having a problem in loading a class in CodeIgniter. Hope you can help me with this! Smile

Here is the scenario.

Before I am using Composer to load packages/classes in my project. Very helpful. Makes my life easy.

But suddenly, I cannot install packages. It shows zlib_decode data error. I don't what really happened.
I am still looking for a solution but for now, I just want to load a package in my project. 

The package is the phpoffice/phpspreadsheet.[url=https://packagist.org/packages/phpoffice/phpspreadsheet][/url]

My question is: how can I include this package/class in my project? So I can call/instantiate the Spreadsheet class.
$spreadsheet = new Spreadsheet();

I have tried putting it in application/libraries and application/third_party folder. I also have tried using require_once APPPATH . '..'


Still I cant instantiate the Spreadsheet class.

Would you guide me how to properly load a class in CodeIgniter? THANKS! Smile
Reply


Messages In This Thread
Load a class in CodeIgniter - by danangeloalcanar - 01-03-2018, 01:50 AM
RE: Load a class in CodeIgniter - by Paradinight - 01-03-2018, 02:05 AM
RE: Load a class in CodeIgniter - by Paradinight - 01-03-2018, 03:40 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.