PHPackages                             luguohuakai/ini - 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. luguohuakai/ini

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

luguohuakai/ini
===============

simple ini get and set

v1.0.3(1y ago)057MITPHPPHP &gt;=7.4

Since Sep 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/luguohuakai/ini)[ Packagist](https://packagist.org/packages/luguohuakai/ini)[ RSS](/packages/luguohuakai-ini/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

ini
===

[](#ini)

非常简单的ini配置文件读取/写入方法
simple ini get and set.

使用方法
====

[](#使用方法)

> 只暴露4个方法和1个属性 `load()` `get()` `set()` `setAll()` `all`

初始化
---

[](#初始化)

- new
- load

```
// new 或者 load
$ini = new Ini('./config.ini')
// 或者这样写
$ini = Ini::load('./config.ini')
```

获取值
---

[](#获取值)

- get

```
// 基础用法
$ini->get('name')
// 使用默认值
$ini->get('name', 'Rose')
// 获取深层次下的值
$ini->get('a.b')
$ini->get('a.b.c')
$ini->get('a.b.c.d')
```

### 获取全部值

[](#获取全部值)

- all

```
$all = $ini->all
```

设置值(即时写入文件)
-----------

[](#设置值即时写入文件)

- set
- setAll

```
// 设置一个值
$ini->set('age', 18)
// 设置多个值
$ini->setAll(['name' => 'Tim', 'age' => 17])
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance50

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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 ~219 days

Total

4

Last Release

365d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f4e6db0dd083b1cc18593e5eb511d7afbd6ac00c0c0caab1ce9f3e82f8e58b8?d=identicon)[luguohuakai](/maintainers/luguohuakai)

---

Top Contributors

[![luguohuakai](https://avatars.githubusercontent.com/u/16839001?v=4)](https://github.com/luguohuakai "luguohuakai (6 commits)")

### Embed Badge

![Health badge](/badges/luguohuakai-ini/health.svg)

```
[![Health](https://phpackages.com/badges/luguohuakai-ini/health.svg)](https://phpackages.com/packages/luguohuakai-ini)
```

###  Alternatives

[colinmollenhour/modman

Module Manager

71978.3k3](/packages/colinmollenhour-modman)[elements/process-manager-bundle

The Process Manager allows you to manage (define,execute...) arbitrary processes/commands in the Pimcore backend.

47665.0k5](/packages/elements-process-manager-bundle)

PHPackages © 2026

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