Problem with namespaces |
03-28-2018, 09:03 AM
(This post was last modified: 03-29-2018, 06:52 AM by ayukawaa. Edit Reason: typo error )
Hi, I want to use the package DamerauLevenshtein, installed it through composer but its not working... need some help (i'm and old programmer not good with namespaces)
In the same codeigniter project I have installed through composer phpoffice/phpexcel and its working ok I have in the config PHP Code: $config['composer_autoload'] = APPPATH.'vendor/autoload.php'; went to packagist, search for my package https://packagist.org/packages/oefenweb/...evenshtein and then open command in application folder and install it Quote:composer require oefenweb/damerau-levenshtein after install, checked all files in place, its installed in Quote:application\vendor\oefenweb\damerau-levenshtein\src\DamerauLevenshtein.php its header is PHP Code: <?php in my controller I have PHP Code: <?php and i have when called an error exception PHP Code: Type: Error on the line: "$dl = new DamerauLevenshtein(..." I have tried with all posible combinations on top of the class , with and without the require of the autoload, change namespace... its all the same... Quote:require_once APPPATH."vendor/autoload.php'; so i'm stuck... always the same error. What am I doing wrong? PS: I really need this, the PHP levenstein function does not work for me because of the type of strings i will be testing. |
Welcome Guest, Not a member yet? Register Sign In |