CodeIgniter + omnipay installation

折月煮酒 提交于 2019-11-30 16:09:03

I'm not sure how you installed Omnipay, but you need to use Composer to load the classes before you can use them.

So following the Omnipay installation instructions, add this to a composer.json file in your root directory:

{
    "require": {
        "omnipay/omnipay": "*"
    }
}

Then install the files:

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Now, if you are using CodeIgniter you will need to set it up to include the composer autoloader. Basically, just add this line to the top of your index.php file:

require_once __DIR__.'/vendor/autoload.php';

There is also a tutorial on using Composer with CodeIgniter here which you may find helpful: http://philsturgeon.co.uk/blog/2012/05/composer-with-codeigniter

I had the same error and fixed it by loading vendor/autoload.php before application/core/CodeIgniter.php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!