PHPackages                             agile/phpeditdotenv - 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. agile/phpeditdotenv

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

agile/phpeditdotenv
===================

编辑'.env'文件

1.0.1(9y ago)1671MITPHPPHP &gt;=5.4

Since Sep 21Pushed 9y agoCompare

[ Source](https://github.com/php360/phpeditdotenv)[ Packagist](https://packagist.org/packages/agile/phpeditdotenv)[ RSS](/packages/agile-phpeditdotenv/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)Used By (0)

phpeditdotenv
=============

[](#phpeditdotenv)

编辑“.env”文件

\####加载

```
composer require 'agile/phpeditdotenv:~1.0'

或者在composer.json文件中添加
"require": {
    "agile/phpeditdotenv": "~1.0"
}

```

\####使用 use Agile\\Phpeditdotenv\\Dotenv;

```
public function index()
{
    // 读取
    $envData = Dotenv::load(realpath('../'));
    var_dump($envData);

    // 修改某一项参数并保存
    $envData['CACHE_DRIVER'] = 'redis';
    Dotenv::save($envData, realpath('../'));
}

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3535d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/686cf65e666fda86843175d468362bb08e7bb46d11147c38622984b0c5c7ccd6?d=identicon)[huanguosoft](/maintainers/huanguosoft)

---

Top Contributors

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

---

Tags

environmentenvdotenveditdotenv

### Embed Badge

![Health badge](/badges/agile-phpeditdotenv/health.svg)

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

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k640.2M6.2k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k243.3M2.7k](/packages/symfony-dotenv)[diarmuidie/envpopulate

Tool to interactively populate a `.env` file based on an `.env.example` file whenever Composer installs or updates.

1695.7k](/packages/diarmuidie-envpopulate)[zepgram/magento-dotenv

Simple autoloader to integrate the Symfony Dotenv component into Magento2

1376.0k](/packages/zepgram-magento-dotenv)[nystudio107/dotenvy

Speed up your production sites by ditching .env for key/value variable pairs as Apache, Nginx, and shell equivalents.

317.0k](/packages/nystudio107-dotenvy)[dotenv-org/phpdotenv-vault

Load environment variables from encrypted .env.vault files

1018.1k2](/packages/dotenv-org-phpdotenv-vault)

PHPackages © 2026

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