承接 mykehowells/dotenv 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mykehowells/dotenv

Composer 安装命令:

composer require mykehowells/dotenv

包简介

Load .env file into project environment, using same functions as Laravel

README 文档

README

Stable version Unstable version

If you have used Laravel and gotten used to being able to set and switch between environments as easily as swapping out a .env file.

Using mykehowells/dotenv, you can now add that functionality to your own projects with composer.

Install via Composer

Add mykehowells/dotenv to your project via composer with the following line:

composer require mykehowells/dotenv

Add the below code to check for a .env file, and import if it exists. Preferably, you should store this file outside of any publicly accessible directories, as it will contain potentially sensitive data - such as database credentials.

Check out the vlucas/phpdotenv readme for more info on that package.

/*----------------------------------------------------------------------------
| ENV CONFIGURATION
|-----------------------------------------------------------------------------
|
| Check to see if an env file exists at project root, if it does, import
| keys and values into putenv( $setting ), otherwise env( $key, $default=null )
| will return default value.
|
|---------------------------------------------------------------------------*/
load_env( __DIR__ );

You can then start using the env( $key, $default = null ) function to retrieve data from your .env file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL
  • 更新时间: 2016-03-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固