8000 GitHub - roy6513/phpenv: Easy to load system enivronment configuration from $_ENV,$_SERVER,getenv.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ phpenv Public
forked from zrcing/phpenv

Easy to load system enivronment configuration from $_ENV,$_SERVER,getenv.

License

Notifications You must be signed in to change notification settings

roy6513/phpenv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Env

Easy to load system enivronment configuration from $_ENV,$_SERVER,getenv.

##Demo ###Step 1: Created .env file

#Master database
DB_HOST = '127.0.0.1' #Local database
DB_NAME="db_name"
DB_USER="root"
DB_PWD="root"
DB_PORT=3306

#Slave database 1
DB_SLAVE1_HOST="127.0.0.1"
DB_SLAVE1_NAME="db_name"
DB_SLAVE1_USER="root"
DB_SLAVE1_PWD="root"
DB_SLAVE1_PORT=3306

###Step 2: Using use Phpenv\Env;

$envFile = realpath(".env");
Env::load($envFile);

print_r($_ENV);
print_r($_SERVER);

License

Released under the MIT license.

About

Easy to load system enivronment configuration from $_ENV,$_SERVER,getenv.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%
0