chekun / codeposer

A better way to build modern CodeIgniter Applications.
http://codeposer.chekun.me
20 stars 8 forks source link

引入 vlucas/phpdotenv #1

Closed chekun closed 8 years ago

chekun commented 8 years ago

Why .env?

You should never store sensitive credentials in your code. Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments – such as database credentials or credentials for 3rd party services – should be extracted from the code into environment variables.

Basically, a .env file is an easy way to load custom configuration variables that your application needs without having to modify .htaccess files or Apache/nginx virtual hosts. This means you won't have to edit any files outside the project, and all the environment variables are always set no matter how you run your project - Apache, Nginx, CLI, and even PHP 5.4's built-in webserver. It's WAY easier than all the other ways you know of to set environment variables, and you're going to love it.

chekun commented 8 years ago

Support in v1.1.0 Close for good!