From 457e2cee18e7facaa9c2d200888842180579825e Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 1 Nov 2021 18:45:49 +0800 Subject: [PATCH] try to check exist curl before install --- platform/Normal.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/Normal.php b/platform/Normal.php index 2e7782b..880fdf9 100644 --- a/platform/Normal.php +++ b/platform/Normal.php @@ -278,8 +278,14 @@ language:
'; $title = getconstStr('SelectLanguage'); return message($html, $title, 201); } - $html .= ''.getconstStr('ClickInstall').', '.getconstStr('LogintoBind'); - $title = 'Install'; + + if (function_exists('curl_init')) { + $title = 'Install'; + $html = '' . getconstStr('ClickInstall') . ', ' . getconstStr('LogintoBind'); + } else { + $title = 'Error'; + $html = 'Need curl, please install php-curl.'; + } return message($html, $title, 201); }