This commit is contained in:
Wisp X
2018-10-13 16:45:17 +08:00
parent 4ffa1622ba
commit ecb0c80ee2
3 changed files with 7 additions and 4 deletions
+1
View File
@@ -22,6 +22,7 @@
---
* PHP版本 ≥ 5.6
* Mysqli
* Finfo拓展
* Curl拓展
* Zip拓展
* Rewrite
+4 -2
View File
@@ -19,11 +19,11 @@ class Install extends Controller
{
public function index($stop = 1)
{
// TODO 检测是否已安装
$rootPath = Env::get('root_path');
$configPath = Env::get('config_path');
// 检测是否已安装
if (file_exists($rootPath . 'install.lock') && !Session::has('install_success')) {
exit('你已安装成功,请勿重复安装!');
}
@@ -31,16 +31,18 @@ class Install extends Controller
$phpVerGt56 = PHP_VERSION >= 5.6;
$isCurl = function_exists('curl_init');
$isZip = function_exists('zip_open');
$isFinfo = function_exists('finfo_open');
$isMysqli = class_exists('mysqli');
switch ($stop) {
case 1:
// 运行环境检测
$testing = $phpVerGt56 && $isCurl && $isZip && $isMysqli;
$testing = $phpVerGt56 && $isCurl && $isFinfo && $isZip && $isMysqli;
$this->assign([
'phpVerGt56' => $phpVerGt56,
'isCurl' => $isCurl,
'isZip' => $isZip,
'isFinfo' => $isFinfo,
'isMysqli' => $isMysqli,
'testing' => $testing
]);
+2 -2
View File
@@ -52,10 +52,10 @@
</tr>
<tr>
<td align="right">
Curl拓展:
finfo拓展:
</td>
<td align="left">
{if ($isCurl) }
{if ($isFinfo) }
<i class="mdui-icon material-icons mdui-text-color-green">&#xe86c;</i>
{else/}
<i class="mdui-icon material-icons mdui-text-color-red">&#xe5c9;</i>