Codeigniter + Composer [英] Codeigniter + Composer
问题描述
我想开始学习Codeigniter
.但似乎 Codeigniter 不支持通过 Composer 安装.当我在 Google 中搜索时,我找到了这个 link.Codeigniter 似乎不支持 Composer 创建的 autoload.php 文件.该文档描述了通过下载 .zip 存档进行的唯一安装.我不确定 Codeigniter 现在是否是一个不错的选择.是吗?
I would like to start learning Codeigniter
. But it seems that Codeigniter has not support for installation via Composer. When I search in Google I found this link. It seems that Codeigniter has not support for autoload.php file created by Composer. The documentation describes the only installation via downloading .zip archive. I am not sure if Codeigniter is a good choice now. Is it?
推荐答案
它在第 3 版中支持 composer.根据 文档 你可以在 application/config/config.php 中设置.
It has composer support in version 3. According to the documentation you can set in application/config/config.php .
$config['composer_autoload'] = TRUE; //around 134 line
它将在 application/vendor
中搜索 composer 自动加载脚本.将 composer.json
放在应用程序(Codeigniter 的应用程序文件夹,而不是根)文件夹中.然后运行composer init
,然后——composer install
.
It will search for composer autoload script inside application/vendor
. Place composer.json
inside application(Codeigniter's application folder, not the root) folder. Then run composer init
, and then - composer install
.
如果 CI 适合您,那么它就是适合您工作的正确工具:)
And if CI fits you, then its right tool for your job:)
附言这里还有一个作曲家安装程序 https://github.com/kenjis/codeigniter-composer-installer
p.s. there is also a composer installer here https://github.com/kenjis/codeigniter-composer-installer
这篇关于Codeigniter + Composer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!