From 3d3b2541dc465f9a8bc7731ccfdf669ba2fae9cb Mon Sep 17 00:00:00 2001 From: printempw Date: Tue, 9 Aug 2016 13:20:18 +0800 Subject: [PATCH] use version_compare() to check PHP version --- app/Services/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Config.php b/app/Services/Config.php index 2261dbf4..43990cf9 100644 --- a/app/Services/Config.php +++ b/app/Services/Config.php @@ -20,7 +20,7 @@ class Config public static function checkPHPVersion() { - if (strnatcasecmp(phpversion(), '5.5.9') < 0) + if (version_compare(PHP_VERSION, '5.5.9', '<')) throw new E('Blessing Skin Server v3 要求 PHP 版本不低于 5.5.9,当前版本为 '.phpversion(), -1, true); }