File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2121$ dotenv ->load ();
2222
2323echo "ENV: " . APPLICATION_ENV . PHP_EOL ;
24- echo "DB_HOST: " . getenv ( 'DB_HOST ' ) . ": " . getenv ( 'DB_PORT ' ) . PHP_EOL ;
24+ echo "DB_HOST: " . $ _ENV [ 'DB_HOST ' ] . ": " . $ _ENV [ 'DB_PORT ' ] . PHP_EOL ;
2525
2626
2727Autoload::addNamespace (
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ function () {
3131 function () {
3232 return new Mysql (
3333 [
34- 'host ' => getenv ( 'DB_HOST ' ) ,
35- 'port ' => getenv ( 'DB_PORT ' ) ,
36- 'username ' => getenv ( 'DB_USERNAME ' ) ,
37- 'password ' => getenv ( 'DB_PASSWORD ' ) ,
38- 'dbname ' => getenv ( 'DB_NAME ' ) ,
34+ 'host ' => $ _ENV [ 'DB_HOST ' ] ?? ' 127.0.0.1 ' ,
35+ 'port ' => $ _ENV [ 'DB_PORT ' ] ?? 3306 ,
36+ 'username ' => $ _ENV [ 'DB_USERNAME ' ] ?? ' phalcon ' ,
37+ 'password ' => $ _ENV [ 'DB_PASSWORD ' ] ?? '' ,
38+ 'dbname ' => $ _ENV [ 'DB_NAME ' ] ?? ' phalcon ' ,
3939 ]
4040 );
4141 }
You can’t perform that action at this time.
0 commit comments