flux-eco/dot-env

Loads .env-Files

Installs: 41

Dependents: 4

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Type:flux-app

1.2.0 2022-04-08 19:07 UTC

This package is auto-updated.

Last update: 2024-04-08 23:45:17 UTC


README

Loads .env-Files

Usage

.env-File

STORAGE_HOST=localhost
STORAGE_NAME=projection
STORAGE_USER=emmett
STORAGE_PASSWORD=fluxcapacitor

loadAndPrint.php

<?php

require_once __DIR__ . '/../vendor/autoload.php';

FluxEco\DotEnv\Api::new()->load(__DIR__);

echo getenv('STORAGE_USER').PHP_EOL;
echo getenv('STORAGE_PASSWORD').PHP_EOL;

output

emmett
fluxcapacitor

functional Usage

<?php

require_once __DIR__ . '/../vendor/autoload.php';

fluxDotEnv\loadDotEnv(__DIR__);

echo getenv('STORAGE_USER').PHP_EOL;
echo getenv('STORAGE_PASSWORD').PHP_EOL;

Contributing 💜

Please ...

  1. ... register an account at https://git.fluxlabs.ch
  2. ... create pull requests 🔥

Adjustment suggestions / bug reporting 🐾

Please ...

  1. ... register an account at https://git.fluxlabs.ch
  2. ... ask us for a Service Level Agreement: support@fluxlabs.ch 😘
  3. ... read and create issues