simp/environment 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

simp/environment

最新稳定版本:v1.1.2

Composer 安装命令:

composer require simp/environment

包简介

This is package for handling site configuration

README 文档

README

Overview

The Environment Library is designed to manage configuration settings and environment variables for your PHP applications. It provides an easy-to-use interface for loading, retrieving, and setting environment variables to streamline application development.

Features

  • Load environment variables from files.
  • Retrieve environment variables with default fallbacks.
  • Dynamically set environment variables.
  • Exception handling for invalid configurations.

Installation

To use the Environment Library, include it in your project directory or install it via Composer:

composer require simp/environment

Usage

Loading Environment Variables

You can load environment variables:

// Save configuration
\Simp\Environment\Environment::create("server_host", [
    "host" => "localhost",
    "port" => 3306,
    "database" => "database",
    "username" => "chance_",
    "password" => "12345",
    "prefix" => "chance_"
]);

// Get configuration data.
\Simp\Environment\Environment::load('server_host')

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contribution

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-29