From 2bc7043d0bd1a9395b2e9ce28eaf66934b7f34bb Mon Sep 17 00:00:00 2001 From: popcorner <351633+popcorner@user.noreply.gitee.com> Date: Mon, 17 Aug 2020 22:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E4=B8=80=E5=A4=84PHP5.3?= =?UTF-8?q?=E4=B8=8D=E5=85=BC=E5=AE=B9=E7=9A=84=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/admincp/admincp_index.php | 3 ++- upload/uc_server/control/admin/frame.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/upload/source/admincp/admincp_index.php b/upload/source/admincp/admincp_index.php index ca7d70c83..bf56c2b34 100644 --- a/upload/source/admincp/admincp_index.php +++ b/upload/source/admincp/admincp_index.php @@ -232,8 +232,9 @@ if(isfounder()) { showtableheader('运行环境检测', 'fixpadding'); $env_ok = true; +$now_ver_gd = function_exists('gd_info')? gd_info() : false; $now_ver = array('PHP' => constant('PHP_VERSION'), 'MySQL' => helper_dbtool::dbversion(), 'gethostbyname' => function_exists('gethostbyname'), 'file_get_contents' => function_exists('file_get_contents'), 'xml_parser_create' => function_exists('xml_parser_create'), -'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => (function_exists('gd_info') ? preg_replace('/[^0-9.]+/', '', gd_info()['GD Version']) : false)); +'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => ($now_ver_gd ? preg_replace('/[^0-9.]+/', '', $now_ver_gd['GD Version']) : false)); $req_ver = array('PHP' => '5.3', 'MySQL' => '5.0', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '1.0'); $sug_ver = array('PHP' => '7.1', 'MySQL' => '5.7', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '2.0'); foreach ($now_ver as $key => $value) { diff --git a/upload/uc_server/control/admin/frame.php b/upload/uc_server/control/admin/frame.php index 140a3bbcc..f7134205a 100644 --- a/upload/uc_server/control/admin/frame.php +++ b/upload/uc_server/control/admin/frame.php @@ -195,8 +195,9 @@ class control extends adminbase { function _get_uc_envstatus() { $version = constant('UC_SERVER_VERSION'); + $now_ver_gd = function_exists('gd_info')? gd_info() : false; $now_ver = array('PHP' => constant('PHP_VERSION'), 'MySQL' => $this->db->result_first("SELECT VERSION()"), 'gethostbyname' => function_exists('gethostbyname'), 'file_get_contents' => function_exists('file_get_contents'), 'xml_parser_create' => function_exists('xml_parser_create'), - 'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => (function_exists('gd_info') ? preg_replace('/[^0-9.]+/', '', gd_info()['GD Version']) : false)); + 'FileSock Function' => (function_exists('fsockopen') || function_exists('pfsockopen') || function_exists('stream_socket_client') || function_exists('curl_init')), 'GD' => ($now_ver_gd ? preg_replace('/[^0-9.]+/', '', $now_ver_gd['GD Version']) : false)); $req_ver = array('PHP' => '5.3', 'MySQL' => '5.0', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '1.0'); $sug_ver = array('PHP' => '7.1', 'MySQL' => '5.7', 'filter_var' => true, 'gethostbyname' => true, 'file_get_contents' => true, 'xml_parser_create' => true, 'FileSock Function' => true, 'GD' => '2.0'); foreach ($now_ver as $key => $value) { -- Gitee