Load external library in codeigniter

Owen Bula picture Owen Bula · Jul 10, 2017 · Viewed 11.3k times · Source

How can I access the getid3 class and use it in my controller?

project
 /application
 /controller
 /libraries
    /getID3
       /getid3
          getid3.php
 /model
 /views   

Answer

Bhavin picture Bhavin · Jul 10, 2017

Use CodeIgniter's built in constant, APPPATH. (Because code is not written in codeigniter's syntaxes)

`require_once(APPPATH.'libraries/getID3/getid3/getid3.php');`

If this library is codeigniter's built in library then you should use.

$this->load->library('libary name');