mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
[admin] filter improve & fix ad link
This commit is contained in:
@@ -403,7 +403,7 @@ class Install
|
||||
return NexusDB::insert('users', $insert);
|
||||
}
|
||||
|
||||
public function createEnvFile($data)
|
||||
public function createEnvFile($data, $scene = 'install')
|
||||
{
|
||||
$envExampleFile = ROOT_PATH . ".env.example";
|
||||
$envExampleData = readEnvFile($envExampleFile);
|
||||
@@ -424,6 +424,17 @@ class Install
|
||||
$this->doLog("[CREATE ENV] key: $key, new value: $value from example.");
|
||||
$newData[$key] = $value;
|
||||
}
|
||||
if ($scene == 'install') {
|
||||
if ($key == 'APP_ENV') {
|
||||
$newData[$key] = 'production';
|
||||
}
|
||||
if ($key == 'APP_DEBUG') {
|
||||
$newData[$key] = 'false';
|
||||
}
|
||||
if ($key == 'LOG_LEVEL') {
|
||||
$newData[$key] = 'info';
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->doLog("[CREATE ENV] final newData: " . json_encode($newData));
|
||||
unset($key, $value);
|
||||
|
||||
Reference in New Issue
Block a user