Skip to content

Commit 628f0bc

Browse files
committed
Add documentation for custom file names.
1 parent 2a023b4 commit 628f0bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ $dotenv = new Dotenv\Dotenv(__DIR__);
8383
$dotenv->load();
8484
```
8585

86+
Optionally you can pass in a filename as the second parameter, if you would like to use something other than `.env`
87+
88+
```php
89+
$dotenv = new Dotenv\Dotenv(__DIR__, 'myconfig');
90+
$dotenv->load();
91+
```
92+
8693
All of the defined variables are now accessible with the `getenv`
8794
method, and are available in the `$_ENV` and `$_SERVER` super-globals.
8895

0 commit comments

Comments
 (0)