From 9c18966ebb671da9a98910f8372c394882441cb9 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Fri, 22 Mar 2019 17:10:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=B8=AD=E5=BF=83=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/PluginsAdminService.php | 13 +++++++++++++ config/shopxo.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/application/service/PluginsAdminService.php b/application/service/PluginsAdminService.php index e7a1cab53..6edd74411 100755 --- a/application/service/PluginsAdminService.php +++ b/application/service/PluginsAdminService.php @@ -961,6 +961,19 @@ php; } } } + + // sql运行 + $install_sql = APP_PATH.'plugins'.DS.$plugins_name.DS.'install.sql'; + if(!empty($plugins_name) && file_exists($install_sql)) + { + // 开始处理 + $ret = SqlconsoleService::Implement(['sql'=>file_get_contents($install_sql)]); + if($ret['code'] != 0) + { + return $ret; + } + } + return DataReturn('安装成功'); } } diff --git a/config/shopxo.php b/config/shopxo.php index 3912d471c..1df505894 100755 --- a/config/shopxo.php +++ b/config/shopxo.php @@ -15,7 +15,7 @@ return [ // 开发模式 - 'is_develop' => false, + 'is_develop' => true, // 默认编码 'default_charset' => 'utf-8',