Skip to content

Commit 8d53579

Browse files
Updated README header (#402)
1 parent 420a2a8 commit 8d53579

File tree

1 file changed

+46
-35
lines changed

1 file changed

+46
-35
lines changed

README.md

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,55 @@
11
PHP dotenv
22
==========
33

4-
Loads environment variables from `.env` to `getenv()`, `$_ENV` and
5-
`$_SERVER` automagically.
4+
Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
65

7-
This is a PHP version of the original [Ruby
6+
![Banner](https://user-images.githubusercontent.com/2829600/71564012-31105580-2a91-11ea-9ad7-ef1278411b35.png)
7+
8+
<p align="center">
9+
<a href="https://travis-ci.org/vlucas/phpdotenv"><img src="https://img.shields.io/travis/vlucas/phpdotenv/master.svg?style=flat-square" alt="Build Status"></img></a>
10+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-BSD%203--Clause-brightgreen.svg?style=flat-square" alt="Software License"></img></a>
11+
<a href="https://packagist.org/packages/vlucas/phpdotenv"><img src="https://img.shields.io/packagist/dt/vlucas/phpdotenv.svg?style=flat-square" alt="Total Downloads"></img></a>
12+
<a href="https://github.com/vlucas/phpdotenv/releases"><img src="https://img.shields.io/github/release/vlucas/phpdotenv.svg?style=flat-square" alt="Latest Version"></img></a>
13+
</p>
14+
15+
16+
Why .env?
17+
---------
18+
19+
**You should never store sensitive credentials in your code**. Storing
20+
[configuration in the environment](http://www.12factor.net/config) is one of
21+
the tenets of a [twelve-factor app](http://www.12factor.net/). Anything that is
22+
likely to change between deployment environments – such as database credentials
23+
or credentials for 3rd party services – should be extracted from the code into
24+
environment variables.
25+
26+
Basically, a `.env` file is an easy way to load custom configuration variables
27+
that your application needs without having to modify .htaccess files or
28+
Apache/nginx virtual hosts. This means you won't have to edit any files outside
29+
the project, and all the environment variables are always set no matter how you
30+
run your project - Apache, Nginx, CLI, and even PHP 5.4's built-in webserver.
31+
It's WAY easier than all the other ways you know of to set environment
32+
variables, and you're going to love it!
33+
34+
* NO editing virtual hosts in Apache or Nginx
35+
* NO adding `php_value` flags to .htaccess files
36+
* EASY portability and sharing of required ENV values
37+
* COMPATIBLE with PHP's built-in web server and CLI runner
38+
39+
PHP dotenv is a PHP version of the original [Ruby
840
dotenv](https://github.com/bkeepers/dotenv).
941

10-
[![Build Status](https://travis-ci.org/vlucas/phpdotenv.svg?branch=master)](https://travis-ci.org/vlucas/phpdotenv)
42+
43+
Installation with Composer
44+
--------------------------
45+
46+
Installation is super-easy via [Composer](https://getcomposer.org/):
47+
48+
```bash
49+
$ composer require vlucas/phpdotenv
50+
```
51+
52+
or add it by hand to your `composer.json` file.
1153

1254

1355
UPGRADING FROM V3
@@ -46,37 +88,6 @@ For more details, please see the
4688
the [upgrading guide](UPGRADING.md).
4789

4890

49-
Why .env?
50-
---------
51-
52-
**You should never store sensitive credentials in your code**. Storing
53-
[configuration in the environment](http://www.12factor.net/config) is one of
54-
the tenets of a [twelve-factor app](http://www.12factor.net/). Anything that is
55-
likely to change between deployment environments – such as database credentials
56-
or credentials for 3rd party services – should be extracted from the code into
57-
environment variables.
58-
59-
Basically, a `.env` file is an easy way to load custom configuration variables
60-
that your application needs without having to modify .htaccess files or
61-
Apache/nginx virtual hosts. This means you won't have to edit any files outside
62-
the project, and all the environment variables are always set no matter how you
63-
run your project - Apache, Nginx, CLI, and even PHP 5.4's built-in webserver.
64-
It's WAY easier than all the other ways you know of to set environment
65-
variables, and you're going to love it!
66-
67-
* NO editing virtual hosts in Apache or Nginx
68-
* NO adding `php_value` flags to .htaccess files
69-
* EASY portability and sharing of required ENV values
70-
* COMPATIBLE with PHP's built-in web server and CLI runner
71-
72-
73-
Installation with Composer
74-
--------------------------
75-
76-
```shell
77-
composer require vlucas/phpdotenv
78-
```
79-
8091
Usage
8192
-----
8293
The `.env` file is generally kept out of version control since it can contain

0 commit comments

Comments
 (0)