update
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
---
|
||||
* PHP版本 ≥ 5.6
|
||||
* Mysqli
|
||||
* Finfo拓展
|
||||
* Curl拓展
|
||||
* Zip拓展
|
||||
* Rewrite
|
||||
|
||||
@@ -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
|
||||
]);
|
||||
|
||||
@@ -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"></i>
|
||||
{else/}
|
||||
<i class="mdui-icon material-icons mdui-text-color-red"></i>
|
||||
|
||||
Reference in New Issue
Block a user