PHPackages                             ice-php/config - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ice-php/config

ActiveComposer[Utility &amp; Helpers](/categories/utility)

ice-php/config
==============

实现读取多个配置目录下多个配置文件的功能

0.0.2(7y ago)0146MITPHPPHP &gt;=7.1.0

Since Aug 31Pushed 7y ago2 watchersCompare

[ Source](https://github.com/ice-php/config)[ Packagist](https://packagist.org/packages/ice-php/config)[ Docs](https://github.com/ice-php/config)[ RSS](/packages/ice-php-config/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (4)Used By (0)

实现读取多个配置目录下多个配置文件的功能
====================

[](#实现读取多个配置目录下多个配置文件的功能)

- 获取配置的值

    Config::get(&lt;配置文件名&gt;,&lt;配置键&gt;,&lt;下一级配置键&gt;,...)

    或

    config(&lt;配置文件名&gt;,&lt;配置键&gt;,&lt;下一级配置键&gt;,...)

    或

    configDefault(&lt;缺省值&gt;,&lt;配置文件名&gt;,&lt;配置键&gt;,&lt;下一级配置键&gt;,...)
- 设置一个优先的配置目录

    Config::insert(string $dir)
- 设置一个低优先的配置目录

    Config::append(string $dir)
- 获取当前设置的运行配置

    Config::mode():string
- 判断当前是否设置为调试模式

    Config::isDebug():bool
- 获取当前模式

    Config::mode(): string
- 配置文件示例

```

```

#### 本类会自动依优先级对配置目录进行搜索,直到找到指定的配置文件

[](#本类会自动依优先级对配置目录进行搜索直到找到指定的配置文件)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2860d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/148289317?v=4)[icePHP](/maintainers/icePHP)[@IcePHP](https://github.com/IcePHP)

---

Top Contributors

[![ice-php](https://avatars.githubusercontent.com/u/23303429?v=4)](https://github.com/ice-php "ice-php (20 commits)")

---

Tags

configicePHP

### Embed Badge

![Health badge](/badges/ice-php-config/health.svg)

```
[![Health](https://phpackages.com/badges/ice-php-config/health.svg)](https://phpackages.com/packages/ice-php-config)
```

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

3.2k514.6M1.9k](/packages/symfony-options-resolver)[league/config

Define configuration arrays with strict schemas and access values with dot notation

565323.7M35](/packages/league-config)[dflydev/dot-access-configuration

Given a deep data structure representing a configuration, access configuration by dot notation.

13414.5M4](/packages/dflydev-dot-access-configuration)[akaunting/laravel-setting

Persistent settings package for Laravel

490857.9k7](/packages/akaunting-laravel-setting)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6112.5M23](/packages/m1-env)[pheme/yii2-settings

Yii2 Database settings

149753.2k7](/packages/pheme-yii2-settings)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
