코드이그나이터에서 composer 사용

1. centos7에 composer 설치

//먼저 PHP CLI(명령줄 인터페이스) 패키지 및 기타 모든 종속성을 설치

sudo yum install php-cli php-zip wget unzip

sudo yum -y update

cd /tmp

//composer 설치
sudo curl -sS https://getcomposer.org/installer | php

//composer명령어를 어디서든 쓸수있게
mv composer.phar /usr/local/bin/composer

 

composer 에러 :

[RuntimeException] require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use mikey179/vfsstream instead.

해결방법 : composer.json에서 .mikey179/vfsStream 소문자로 변경

 

 

2. 코드이그나이터에 composer 필요한 기능 설치

cd /home/test/public_html

composer require firebase/php-jwt

 

 

3. 코드이그나이터 설정

//index.php
require FCPATH . 'vendor/autoload.php'; //추가
require_once BASEPATH.'core/CodeIgniter.php';

//application/config/config.php
$config['composer_autoload'] = "vender/autoload.php";//변경

 

 

4. 라이브러리 설치

composer require kdyby/facebook

 

5. composer 명령어

https://zetawiki.com/wiki/Composer_%EB%AA%85%EB%A0%B9%EC%96%B4

 

Composer 명령어 - 제타위키

다음 문자열 포함...

zetawiki.com

 

참고자료

https://cloudo3.com/kr/%E1%84%8F%E1%85%B3%E1%86%AF%E1%84%85%E1%85%A1%E1%84%8B%E1%85%AE%E1%84%83%E1%85%B3-%E1%84%8F%E1%85%A5%E1%86%B7%E1%84%91%E1%85%B2%E1%84%90%E1%85%B5%E1%86%BC/centos-7%E1%84%8B%E1%85%A6-composer-%E1%84%89%E1%85%A5%E1%86%AF%E1%84%8E%E1%85%B5/2209

 

http://minkine.blogspot.com/2017/03/blog-post_23.html

 

댓글

Designed by JB FACTORY