CodeIgniter с фатальной ошибкой PHPExcel не может переопределить класс IOFactory

Я пытаюсь использовать PHPExcel с CodeIgniter.

Моя проблема, когда я хочу использовать этот метод ниже, я получилPHP Fatal Error : Cannot redeclare class IOFactory

If you're uncertain of the filetype, you can use the IO Factory's identify() method to identify the reader that you need, before using the createReader() method to instantiate the reader object.

Ниже мой код:

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

$this->load->library('PHPExcel/IOFactory');

$path = $upload_data['full_path'];

$inputFileType = PHPExcel_IOFactory::identify($path);

$objReader = PHPExcel_IOFactory::createReader($inputFileType);

$objPHPExcel = $objReader->load($path);

$objWorksheet = $objPHPExcel->getActiveSheet();

Я пытаюсь найти, если класс IOFactory уже где-то создан, но не может его найти.

К вашему сведению, я использую последнюю версию CodeIgniter (2.1) и PHPExcel (1.7.6) на момент написания статьи.

Ответы на вопрос(3)

Ваш ответ на вопрос