Installing plugins in Codeigniter 2.0.2

2019-07-07 19:10发布

问题:

I want to use the plugin here (http://shuvankar.wordpress.com/2010/05/04/codeigniter-geo-ip-location/) but i cannot find a /systems/plugin folder. Where should I place this plugin file?

Additionally, how do I auto-load this plugin? There is no option for autoloading plugins, just helpers and libraries...

Btw, what is the difference between plugins and libraries?

I'm using Codeigniter 2.0.2

回答1:

Plugins have been phased out as of 2.0 as NiLL has said. However this does not mean you can't use plugins, just make it a helper instead which is the exact same thing, hence why plugins were removed.

Rename the file to geoip_helper.php and place it into your application/helpers directory and then in your autoload.php you should see the option of autoloading a helper and put "geoip" into the array.



回答2:

Plugin had been removed in 2.00 version, see here http://codeigniter.com/user_guide/changelog.html