PHPackages                             litp/sae-phpdotenv - 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. litp/sae-phpdotenv

ActiveLibrary

litp/sae-phpdotenv
==================

A modified version of dotenv that checks putenv function before using it

v2.2.0(10y ago)024BSDPHPPHP &gt;=5.3.9

Since Jan 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/litp/sae-phpdotenv)[ Packagist](https://packagist.org/packages/litp/sae-phpdotenv)[ Docs](http://github.com/vlucas/phpdotenv)[ RSS](/packages/litp-sae-phpdotenv/feed)WikiDiscussions master Synced 2mo ago

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

SAE PHP dotenv
==============

[](#sae-php-dotenv)

SAE PHP dotenv是一个适配SinaAppEngine的PHP dotenv，修改自Vance Lucas的[PHP dotenv](https://github.com/vlucas/phpdotenv)。

唯一的改动是在使用SAE禁用的函数putenv()前，先判断是否存在该函数，如果不存在则不使用该函数，如果存在则不做任何变动。 因为dotenv同时使用putenv,$\_ENV和$\_SERVER方法注册变量，因而在禁用了putenv的服务器上之后不能使用getenv函数来获得相应的环境变量，但可以从全局变量$\_ENV和$\_SERVER中取得变量。

为什么要这么做？
--------

[](#为什么要这么做)

PHP程序慢慢地在向模块化的方向发展，整个程序构建在其他人提供的各种模块之上。 为了能在SAE上使用PHP dotenv的模块以及使用基于PHP dotenv的一些应用（比如 Laravel), 需要一个不使用putenv函数的dotenv，于是有了这个。

欢迎任何意见及建议。

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~73 days

Total

19

Last Release

3707d ago

Major Versions

v1.1.0 → v2.0.02015-05-29

v1.1.1 → v2.0.12015-05-30

PHP version history (2 changes)1.0.0PHP &gt;=5.3.2

v2.1.0PHP &gt;=5.3.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/12c2c17f698f6fd946698ec0a0b6fc3e3a9e38c696115f776e410afe2cd75df3?d=identicon)[litp](/maintainers/litp)

---

Top Contributors

[![vlucas](https://avatars.githubusercontent.com/u/187?v=4)](https://github.com/vlucas "vlucas (51 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (29 commits)")[![litp](https://avatars.githubusercontent.com/u/10564187?v=4)](https://github.com/litp "litp (12 commits)")[![thedavidmeister](https://avatars.githubusercontent.com/u/629710?v=4)](https://github.com/thedavidmeister "thedavidmeister (6 commits)")[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (6 commits)")[![Ultrabenosaurus](https://avatars.githubusercontent.com/u/1901532?v=4)](https://github.com/Ultrabenosaurus "Ultrabenosaurus (4 commits)")[![aaemnnosttv](https://avatars.githubusercontent.com/u/1621608?v=4)](https://github.com/aaemnnosttv "aaemnnosttv (3 commits)")[![shuber](https://avatars.githubusercontent.com/u/2419?v=4)](https://github.com/shuber "shuber (3 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (3 commits)")[![xjchengo](https://avatars.githubusercontent.com/u/4819996?v=4)](https://github.com/xjchengo "xjchengo (2 commits)")[![louim](https://avatars.githubusercontent.com/u/923718?v=4)](https://github.com/louim "louim (2 commits)")[![jbrooksuk](https://avatars.githubusercontent.com/u/246103?v=4)](https://github.com/jbrooksuk "jbrooksuk (1 commits)")[![janyksteenbeek](https://avatars.githubusercontent.com/u/3578636?v=4)](https://github.com/janyksteenbeek "janyksteenbeek (1 commits)")[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (1 commits)")[![harm-less](https://avatars.githubusercontent.com/u/6368074?v=4)](https://github.com/harm-less "harm-less (1 commits)")[![motin](https://avatars.githubusercontent.com/u/793037?v=4)](https://github.com/motin "motin (1 commits)")[![pda](https://avatars.githubusercontent.com/u/15759?v=4)](https://github.com/pda "pda (1 commits)")[![rabbitfang](https://avatars.githubusercontent.com/u/2784296?v=4)](https://github.com/rabbitfang "rabbitfang (1 commits)")[![greydnls](https://avatars.githubusercontent.com/u/1276798?v=4)](https://github.com/greydnls "greydnls (1 commits)")[![stanlemon](https://avatars.githubusercontent.com/u/86314?v=4)](https://github.com/stanlemon "stanlemon (1 commits)")

---

Tags

environmentenvdotenv

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/litp-sae-phpdotenv/health.svg)

```
[![Health](https://phpackages.com/badges/litp-sae-phpdotenv/health.svg)](https://phpackages.com/packages/litp-sae-phpdotenv)
```

###  Alternatives

[vlucas/phpdotenv

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

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.3k](/packages/symfony-dotenv)[johnathanmiller/secure-env-php

Encrypt environment files for production use.

6054.3k2](/packages/johnathanmiller-secure-env-php)[diarmuidie/envpopulate

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

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

Simple autoloader to integrate the Symfony Dotenv component into Magento2

1371.3k](/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.

326.9k](/packages/nystudio107-dotenvy)

PHPackages © 2026

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