From 5c90a962e75f79dfef907d5225bfde288d9139d0 Mon Sep 17 00:00:00 2001 From: xiaomlove <353856593@qq.com> Date: Wed, 27 Jan 2021 16:46:39 +0800 Subject: [PATCH] add .env.example --- .env.example | 9 +++++++++ include/core.php | 2 +- nexus/Install/Install.php | 2 +- public/install/install.php | 10 +--------- 4 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..bdbdebb7 --- /dev/null +++ b/.env.example @@ -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 \ No newline at end of file diff --git a/include/core.php b/include/core.php index c2d15b36..6e3d1964 100644 --- a/include/core.php +++ b/include/core.php @@ -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); diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php index 8da24146..4edf059e 100644 --- a/nexus/Install/Install.php +++ b/nexus/Install/Install.php @@ -281,7 +281,7 @@ class Install $steps = '