try to check exist curl before install

pull/471/head
qkqpttgf 2021-11-01 18:45:49 +08:00 committed by GitHub
parent 0d2f38af37
commit 457e2cee18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -278,8 +278,14 @@ language:<br>';
$title = getconstStr('SelectLanguage');
return message($html, $title, 201);
}
$html .= '<a href="?install0">'.getconstStr('ClickInstall').'</a>, '.getconstStr('LogintoBind');
$title = 'Install';
if (function_exists('curl_init')) {
$title = 'Install';
$html = '<a href="?install0">' . getconstStr('ClickInstall') . '</a>, ' . getconstStr('LogintoBind');
} else {
$title = 'Error';
$html = '<font color="red">Need curl</font>, please install php-curl.';
}
return message($html, $title, 201);
}