Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of codeigniter3 Integrated composer Management tool

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about the use of codeigniter3 integrated composer management tools. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1. Install composer. I won't repeat this point.

2. Create a new composer.json file in the root directory of the project. For example, I want to use a jwt library in ci.

{"require": {"firebase/php-jwt": "*"}}

3. Execute the command line under this directory: composer install

Or the above two steps can be simplified to the following step.

Composer require firebase/php-jwt

4. Here are two ways to formally integrate into ci:

Method 1: simple and rough (not recommended)

The line above require_once'. / vendor/autoload.php';// is added to this location of index.php require_once BASEPATH.'core/CodeIgniter.php'

Method 2: elegant (recommended)

Application/libraries New MY_Composer.php

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report