PHP code example of proximitymad / detectenv
1. Go to this page and download the library: Download proximitymad/detectenv library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
proximitymad / detectenv example snippets
$hosts = [
'mydevhost.dev'=>'dev',
'mytesthost.com'=>'test',
'myprodhost.com'=>'prod',
'myHostName'=>'console',
];
$env = \proximitymad\detectenv\DetectEnv::get($hosts);
$env = \proximitymad\detectenv\DetectEnv::get($hosts, 'prod');
php composer.phar