Anyon 4 vuotta sitten
vanhempi
commit
823a26b9e9

+ 1 - 1
config/database.php

@@ -28,7 +28,7 @@ return [
             // 数据库类型
             'type'            => 'mysql',
             // 服务器地址
-            'hostname'        => '127.0.0.1',
+            'hostname'        => 'server.cuci.cc',
             // 数据库名
             'database'        => 'admin_v6',
             // 用户名

+ 1 - 1
vendor/zoujingli/think-library/src/service/ModuleService.php

@@ -147,7 +147,7 @@ class ModuleService extends Service
             $vars = $this->_getModuleVersion($name);
             if (is_array($vars) && isset($vars['version']) && preg_match('|^\d{4}\.\d{2}\.\d{2}\.\d{2}$|', $vars['version'])) {
                 $data[$name] = array_merge($vars, ['change' => []]);
-                foreach ($service->scanDirectory($this->_getModulePath($name) . '/module/change/', [], 'md') as $file) {
+                foreach ($service->scanDirectory($this->_getModulePath($name) . 'change/', [], 'md') as $file) {
                     $data[$name]['change'][pathinfo($file, PATHINFO_FILENAME)] = Parsedown::instance()->parse(file_get_contents($file));
                 }
             }

+ 1 - 1
vendor/zoujingli/think-library/src/service/NodeService.php

@@ -143,7 +143,7 @@ class NodeService extends Service
      */
     public function scanDirectory($path, $data = [], $ext = 'php')
     {
-        foreach (scandir($path) as $item) if ($item[0] !== '.') {
+        if (file_exists($path) && is_dir($path)) foreach (scandir($path) as $item) if ($item[0] !== '.') {
             $realpath = rtrim($path, '\\/') . DIRECTORY_SEPARATOR . $item;
             if (is_readable($realpath)) if (is_dir($realpath)) {
                 $data = $this->scanDirectory($realpath, $data, $ext);