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

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

dongqibin/ini
=============

ini解析器

0.0.1(7y ago)115MITPHP

Since Apr 28Pushed 6y agoCompare

[ Source](https://github.com/dongqibin/ini)[ Packagist](https://packagist.org/packages/dongqibin/ini)[ RSS](/packages/dongqibin-ini/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

### ini解析

[](#ini解析)

##### 将ini配置转成数组,将数组转成ini配置.支持配置文件读写.

[](#将ini配置转成数组将数组转成ini配置支持配置文件读写)

### 环境要求 :

[](#环境要求-)

##### &gt; 5.4

[](#-54)

### 安装方式 :

[](#安装方式-)

##### composer require dongqibin/ini

[](#composer-require-dongqibinini)

### 一般示例 :

[](#一般示例-)

##### 获取文件内的配置信息 :

[](#获取文件内的配置信息-)

```
$iniClass->loadFile($configFile)->getAll();
```

##### 将配置信息写入文件 :

[](#将配置信息写入文件-)

```
$iniClass->load($config)->write();
```

### 使用方式 :

[](#使用方式-)

###### 从文件加载配置 loadFile($file)

[](#从文件加载配置-loadfilefile)

###### 从数组加载配置 load($config)

[](#从数组加载配置-loadconfig)

###### ini转数组 : decode()

[](#ini转数组--decode)

###### 数组转ini : encode()

[](#数组转ini--encode)

###### 写入文件 : write()

[](#写入文件--write)

###### 获取配置 : getAll()

[](#获取配置--getall)

###### 设置配置路径 : setFile()

[](#设置配置路径--setfile)

###### 获取配置路径 : getFile()

[](#获取配置路径--getfile)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

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

Unknown

Total

1

Last Release

2568d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

configini

### Embed Badge

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

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

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

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

564302.2M24](/packages/league-config)[jbzoo/data

An extended version of the ArrayObject object for working with system settings or just for working with data arrays

891.6M23](/packages/jbzoo-data)

PHPackages © 2026

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