在 Codeigniter 2.0.2 中安装插件
我想在这里使用该插件(http://shuvankar.wordpress.com/2010/05/04/codeigniter-geo-ip-location/),但我找不到 /systems/plugin 文件夹。我应该把这个插件文件放在哪里?
另外,如何自动加载这个插件?没有自动加载插件的选项,只有助手和库...
顺便说一句,插件和库之间有什么区别?
我正在使用 Codeigniter 2.0.2
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 NiLL 所说,插件已从 2.0 开始逐步淘汰。然而,这并不意味着你不能使用插件,只是让它成为一个助手,这是完全相同的事情,这就是为什么插件被删除的原因。
将文件重命名为 geoip_helper.php 并将其放入 application/helpers 目录中,然后在 autoload.php 中,您应该看到自动加载助手的选项并将“geoip”放入数组中。
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.00版本中删除,请参见此处 http://codeigniter.com/user_guide/changelog.html
Plugin had been removed in 2.00 version, see here http://codeigniter.com/user_guide/changelog.html