mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
install: create symbolic link first
This commit is contained in:
@@ -30,6 +30,9 @@ class class_cache_redis {
|
||||
private function connect()
|
||||
{
|
||||
$config = config('database.redis');
|
||||
if (empty($config['host'])) {
|
||||
return false;
|
||||
}
|
||||
$redis = new Redis();
|
||||
$params = [
|
||||
$config['host'],
|
||||
|
||||
@@ -3,8 +3,12 @@ if(!defined('IN_TRACKER')) {
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
if (!file_exists($rootpath . '.env')) {
|
||||
header('Location: ' . getBaseUrl() . 'install/install.php');
|
||||
exit(0);
|
||||
$installScriptRelativePath = 'install/install.php';
|
||||
$installScriptFile = $rootpath . "public/$installScriptRelativePath";
|
||||
if (file_exists($installScriptFile)) {
|
||||
header('Location: ' . getBaseUrl() . $installScriptRelativePath);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
@@ -465,6 +465,7 @@ class Install
|
||||
continue;
|
||||
}
|
||||
$this->doLog("[IMPORT DATA] $table, $sql");
|
||||
sql_query("truncate table $table");
|
||||
sql_query($sql);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -108,9 +108,9 @@ if ($currentStep == 4) {
|
||||
$pass = $settingTableRows['pass'];
|
||||
while ($isPost) {
|
||||
try {
|
||||
$install->importInitialData();
|
||||
$install->saveSettings($settings);
|
||||
$install->createSymbolicLinks($symbolicLinks);
|
||||
$install->saveSettings($settings);
|
||||
$install->importInitialData();
|
||||
$install->nextStep();
|
||||
} catch (\Exception $e) {
|
||||
$_SESSION['error'] = $e->getMessage();
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
'smtp_from' => NULL,
|
||||
'smtpaddress' => 'smtp.qq.com',
|
||||
'smtpport' => '25',
|
||||
'accountname' => '',
|
||||
'accountpassword' => '',
|
||||
'accountname' => '353856593@qq.com',
|
||||
'accountpassword' => 'zixbeopslzidbgbi',
|
||||
),
|
||||
'security' =>
|
||||
array (
|
||||
@@ -347,8 +347,8 @@
|
||||
'code' =>
|
||||
array (
|
||||
'mainversion' => 'NexusPHP',
|
||||
'subversion' => 'Standard v1.5 Beta 4 by xiaomlove',
|
||||
'releasedate' => '2010-09-19',
|
||||
'website' => '<a href="http://nexusphp.cn">http://nexusphp.cn</a>',
|
||||
'subversion' => 'v1.6.0-beta1',
|
||||
'releasedate' => '2021-01-28',
|
||||
'website' => '<a href="http://nexusphp.cn" target="_blank">http://nexusphp.cn</a>',
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user