浏览代码

【程序目录】更新版本判断

evoxwht 2 年之前
父节点
当前提交
6082e7dbe8

+ 7 - 0
crmeb/public/index.php

@@ -12,6 +12,13 @@
 // [ 应用入口文件 ]
 namespace think;
 
+if ('7.1.0' > phpversion()) {
+    exit('您的php版本过低,不能安装本软件,兼容php版本7.2~7.4,谢谢!');
+}
+if (phpversion() >= '8.0.0') {
+    exit('您的php版本太高,不能安装本软件,兼容php版本7.2~7.4,谢谢!');
+}
+
 define('DS', DIRECTORY_SEPARATOR);
 
 //检测是否已安装CRMEB系统

+ 6 - 6
crmeb/public/install/index.php

@@ -17,11 +17,11 @@ if (file_exists('../install.lock')) {
 
 @set_time_limit(1000);
 
-if (PHP_EDITION >= phpversion()) {
-    showHtml('您的php版本过低,不能安装本软件,兼容php版本7.1~7.4,谢谢!');
+if ('7.1.0' > phpversion()) {
+    exit('您的php版本过低,不能安装本软件,兼容php版本7.2~7.4,谢谢!');
 }
-if (phpversion() > 8.0) {
-    showHtml('您的php版本太高,不能安装本软件,兼容php版本7.1~7.4,谢谢!');
+if (phpversion() >= '8.0.0') {
+    exit('您的php版本太高,不能安装本软件,兼容php版本7.2~7.4,谢谢!');
 }
 
 date_default_timezone_set('PRC');
@@ -61,8 +61,8 @@ switch ($step) {
         exit();
 
     case '2':
-        if (phpversion() <= PHP_EDITION || phpversion() > 8.0) {
-            die('本系统需要PHP为 7.2~7.4 版本,当前PHP版本为:' . phpversion());
+        if (phpversion() < '7.1.0' || phpversion() >= '8.0.0') {
+            die('本系统需要PHP为 7.1~7.4 版本,当前PHP版本为:' . phpversion());
         }
 
         $passOne = $passTwo = 'yes';

+ 0 - 2
crmeb/vendor/composer/autoload_real.php

@@ -22,8 +22,6 @@ class ComposerAutoloaderInitf16474ac994ccc25392f403933800b79
             return self::$loader;
         }
 
-        require __DIR__ . '/platform_check.php';
-
         spl_autoload_register(array('ComposerAutoloaderInitf16474ac994ccc25392f403933800b79', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
         spl_autoload_unregister(array('ComposerAutoloaderInitf16474ac994ccc25392f403933800b79', 'loadClassLoader'));

+ 0 - 26
crmeb/vendor/composer/platform_check.php

@@ -1,26 +0,0 @@
-<?php
-
-// platform_check.php @generated by Composer
-
-$issues = array();
-
-if (!(PHP_VERSION_ID >= 70100)) {
-    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
-}
-
-if ($issues) {
-    if (!headers_sent()) {
-        header('HTTP/1.1 500 Internal Server Error');
-    }
-    if (!ini_get('display_errors')) {
-        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
-            fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
-        } elseif (!headers_sent()) {
-            echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
-        }
-    }
-    trigger_error(
-        'Composer detected issues in your platform: ' . implode(' ', $issues),
-        E_USER_ERROR
-    );
-}

+ 1 - 1
crmeb/vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2022-12-10 14:44:41
+// This file is automatically generated at:2023-02-13 09:54:41
 declare (strict_types = 1);
 return array (
   0 => 'think\\captcha\\CaptchaService',