add .env.example

This commit is contained in:
xiaomlove
2021-01-27 16:46:39 +08:00
parent a5cfa1372c
commit 5c90a962e7
4 changed files with 12 additions and 11 deletions

9
.env.example Normal file
View File

@@ -0,0 +1,9 @@
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USERNAME=
MYSQL_PASSWORD=
MYSQL_DATABASE=nexusphp
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_DATABASE=0

View File

@@ -3,7 +3,7 @@ if(!defined('IN_TRACKER')) {
die('Hacking attempt!');
}
if (!file_exists($rootpath . '.env')) {
header('Location: ' . getBaseUrl() . '/install/install.php');
header('Location: ' . getBaseUrl() . 'install/install.php');
exit(0);
}
error_reporting(E_ALL);

View File

@@ -281,7 +281,7 @@ class Install
$steps = '<div class="flex mt-10 step text-center">';
$currentStep = $this->currentStep();
foreach ($this->steps as $key => $value) {
$steps .= sprintf('<div class="flex-1 %s">', $currentStep > $key + 1 ? 'done' : ($currentStep < $key + 1 ? 'none' : ''));
$steps .= sprintf('<div class="flex-1 %s">', $currentStep > $key + 1 ? 'text-green-500' : ($currentStep < $key + 1 ? 'text-gray-500' : ''));
$steps .= sprintf('<div>第%s步</div>', $key + 1);
$steps .= sprintf('<div>%s</div>', $value);
$steps .= '</div>';

View File

@@ -234,15 +234,7 @@ if ($currentStep == 5) {
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<title>Update NexusPHP | step <?php echo $currentStep?></title>
<style type="text/css">
.step .none {
color: #aaa;
}
.step .done {
color: #67c23a;
}
</style>
<title>Install NexusPHP | step <?php echo $currentStep?></title>
</head>
<body>
<div class="container mx-auto">