From 6082e7dbe8251d08e5e4e24d61262f2e6ebc8ee5 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 13 Feb 2023 10:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/public/index.php | 7 +++++++ crmeb/public/install/index.php | 12 +++++------ crmeb/vendor/composer/autoload_real.php | 2 -- crmeb/vendor/composer/platform_check.php | 26 ------------------------ crmeb/vendor/services.php | 2 +- 5 files changed, 14 insertions(+), 35 deletions(-) delete mode 100644 crmeb/vendor/composer/platform_check.php diff --git a/crmeb/public/index.php b/crmeb/public/index.php index cc3331638..8ce6b2d20 100755 --- a/crmeb/public/index.php +++ b/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系统 diff --git a/crmeb/public/install/index.php b/crmeb/public/install/index.php index 73941e2be..9bf341f7d 100755 --- a/crmeb/public/install/index.php +++ b/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'; diff --git a/crmeb/vendor/composer/autoload_real.php b/crmeb/vendor/composer/autoload_real.php index 2127e4a45..917c85aa7 100644 --- a/crmeb/vendor/composer/autoload_real.php +++ b/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')); diff --git a/crmeb/vendor/composer/platform_check.php b/crmeb/vendor/composer/platform_check.php deleted file mode 100644 index 6d3407dbb..000000000 --- a/crmeb/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 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 - ); -} diff --git a/crmeb/vendor/services.php b/crmeb/vendor/services.php index e787b6f0f..0b5996593 100644 --- a/crmeb/vendor/services.php +++ b/crmeb/vendor/services.php @@ -1,5 +1,5 @@ 'think\\captcha\\CaptchaService',