- Added getenvonce
This commit is contained in:
parent
9cd6f10d7e
commit
81e124b144
@ -1,3 +1,13 @@
|
||||
<?php
|
||||
|
||||
if (! function_exists('getenvonce')) {
|
||||
function getenvonce(string $name) : array|string|false
|
||||
{
|
||||
$value = getenv($name);
|
||||
unset($_ENV[$name], $_SERVER[$name]);
|
||||
putenv($name . "=");
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
return require("env/" . ( getenv('APP_ENV') ?? 'prod' ) . ".php");
|
||||
Loading…
x
Reference in New Issue
Block a user