在Codeigniter 2.0.2中安装插件 [英] Installing plugins in Codeigniter 2.0.2

查看:43
本文介绍了在Codeigniter 2.0.2中安装插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这里使用插件(http://shuvankar.wordpress.com/2010/05/04/codeigniter-geo-ip-location/),但是我找不到/systems/plugin文件夹.我应该在哪里放置此插件文件?

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?

我正在使用Codeigniter 2.0.2

I'm using Codeigniter 2.0.2

推荐答案

插件已从2.0开始淘汰.但是,这并不意味着您不能使用插件,只需使其成为一个帮助器,这是完全相同的事情,因此也就删除了插件.

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.

将文件重命名为geoip_helper.php并将其放置在application/helpers目录中,然后在autoload.php中,您应该看到自动加载辅助程序并将"geoip"放入数组的选项.

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.

这篇关于在Codeigniter 2.0.2中安装插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆