I'm trying to put the PHPWord library in codeigniter, so I downloaded PHPWord and extracted the PHPWord folder and the PhpWord.php file to the third_party folder of CI. After that I created in the libraries folder a file with the name word.php
that would extend the functionalities of PhpWord.php.
So far so good, but when I call the library Word.php
in my controller I get the following error
Class PHPWORD not found in (path-of-file / Word.php).
I've heard that before doing this I would need to call the autoloader file, I tried that way too and I did not succeed, anyone know how to help me?
Here is the code for the file Word.PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH."/third_party/PHPWord.php";
class Word extends PHPWord {
public function __construct() {
parent::__construct();
}
}
I followed a part of this tutorial I found on the internet: