Welcome Guest, Not a member yet? Register   Sign In
How to use external php library in codeigniter?
#1

Hey! 

I'm currently creating a project where users can compare two text files (html styled or not), see the differences between those two and then request for embeding those changes in the main file (something like GitHub but without all this fuss of using commands to push changes).

What i found is this library:

Caxy/HtmlDiff/HtmlDiff

I placed the "Caxy" folder inside "libraries" folder of my project and what i get after autoloading the library is:

Autoload.php

PHP Code:
$autoload['libraries'] = array(
    'caxy/htmldiff/htmldiff'
); 


View file
Code:
Fatal error: Class 'Caxy\HtmlDiff\AbstractDiff' not found in "path/path/path/......" on line 10


When on the other hand, i try to use it like this:
PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

use 
Caxy\HtmlDiff\HtmlDiff;

class 
Files extends CI_Controller {
    
   public function 
index(){

   }


 i get this
PHP Code:
An uncaught Exception was encountered
Type
Error

Message
: Class 'Caxy\HtmlDiff\HtmlDiff' not found

Filename
: ...\application\controllers\Files.php 

After searching online i didn't find any solid answer on this issue..

Any ideas or suggestions? 

Thanks!

//Life motto
if (sad() == true) {
     sad().stop();
     develop();
}
Reply


Messages In This Thread
How to use external php library in codeigniter? - by HarrysR - 09-08-2019, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB