Skip to content

Instantly share code, notes, and snippets.

@victorknust
Created August 30, 2016 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorknust/71474bde549102c5c8b5505a7546a99f to your computer and use it in GitHub Desktop.
Save victorknust/71474bde549102c5c8b5505a7546a99f to your computer and use it in GitHub Desktop.
<?php
// development
// testing
$environment = 'production';
//-------------------------------------------
$config = [
'production' => [
'url' => 'http://127.0.0.1',
'mail' => [],
'database' => [
'client' => 'mysql',
'connection' => [
'host' => '127.0.0.1',
'user' => 'root',
'password' => '',
'database' => 'testing',
'charset' => 'utf8'
]
],
'server' => [
'host' => '127.0.0.1',
'port' => '80'
],
'paths' => [
'upload' => 'uploads/'
]
]
];
//-------------------------------------------
$c = $config[$environment];
//-------------------------------------------
echo $c['database']['client'];
echo $c['database']['connection']['host'];
echo $c['paths']['upload'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment