diff --git a/README.md b/README.md index 868f94f3..fbfe6df6 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ --- * PHP版本 ≥ 5.6 * Mysqli +* Finfo拓展 * Curl拓展 * Zip拓展 * Rewrite diff --git a/application/index/controller/Install.php b/application/index/controller/Install.php index e99ed8e8..38ab3dcf 100644 --- a/application/index/controller/Install.php +++ b/application/index/controller/Install.php @@ -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 ]); diff --git a/application/index/view/install/index.html b/application/index/view/install/index.html index 54a50cb5..81763e31 100644 --- a/application/index/view/install/index.html +++ b/application/index/view/install/index.html @@ -52,10 +52,10 @@ - Curl拓展: + finfo拓展: - {if ($isCurl) } + {if ($isFinfo) } {else/}