rabin 4 months ago
parent
commit
9808e00541
3 changed files with 12 additions and 25 deletions
  1. 3 19
      README.md
  2. 7 5
      src/Dever/Library.php
  3. 2 1
      src/Dever/Project.php

+ 3 - 19
README.md

@@ -17,28 +17,12 @@ DeverPHP 2.0
 
 ## 版权信息
 
-ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
+DeverPHP2遵循Apache2开源协议发布,并提供免费使用。
 
 本项目包含的第三方源码和二进制文件之版权信息另行标注。
 
-版权所有Copyright © 2022-2023 by DeverPHP (http://www.dever.cc/) All rights reserved。
+版权所有Copyright © 2023-2024 by DeverPHP (http://www.dever.cc/) All rights reserved。
 
 DeverPHP® 商标和著作权所有者为北京时空之翼网络科技有限公司。
 
-更多细节参阅 [LICENSE.txt](LICENSE.txt)
-
-
-# 名称
-	'name' => 'Dever元生态系统',
-	# 版本配置
-	'version' => '1.0.0 Beta',
-	# 框架名称
-	'framework_name' => 'Dever生态系统 初代核心',
-	# 基本描述
-	'desc' => '高门槛 / 低代码 / 多次元 / 生态化',
-	# copyright
-	'copyright' => '© 2019-2021 dever.cc,Inc. Licensed under MIT license.',
-	# github
-	'github' => 'https://github.com/dever-main/framework',
-	# web
-	'web' => 'http://www.dever.cc/',
+更多细节参阅 [LICENSE](LICENSE)

+ 7 - 5
src/Dever/Library.php

@@ -8,17 +8,19 @@ class Library
         $class = explode('\\', $class);
         if (isset($class[3])) {
             self::require(lcfirst($class[0]), lcfirst($class[1]) . DIRECTORY_SEPARATOR . $class[2] . DIRECTORY_SEPARATOR . $class[3]);
-        } else {
+        } elseif (isset($class[2])) {
             self::require(lcfirst($class[0]), lcfirst($class[1]) . DIRECTORY_SEPARATOR . $class[2]);
         }
     }
     public static function require($app, $file)
     {
         $project = Project::load($app);
-        $file = $project['path'] . $file . '.php';
-        if (is_file($file) && empty(self::$file[$file])) {
-            self::$file[$file] = true;
-            require $file;
+        if ($project) {
+            $file = $project['path'] . $file . '.php';
+            if (is_file($file) && empty(self::$file[$file])) {
+                self::$file[$file] = true;
+                require $file;
+            }
         }
     }
     public static function apply($file, $app, $path)

+ 2 - 1
src/Dever/Project.php

@@ -48,6 +48,7 @@ class Project
         if (isset(self::$content[$app])) {
             return self::$content[$app];
         }
-        Output::error('app not exists:' . $app);
+        return false;
+        //Output::error('app not exists:' . $app);
     }
 }