更新3.0
This commit is contained in:
@@ -12,6 +12,17 @@
|
||||
// [ 应用入口文件 ]
|
||||
namespace think;
|
||||
|
||||
// 检测PHP环境
|
||||
if(version_compare(PHP_VERSION,'7.2.0','<')) die('require 7.2.0 < PHP <= 7.3.0 !');
|
||||
if(version_compare(PHP_VERSION,'7.3.0','>')) die('require 7.2.0 < PHP <= 7.3.0 !');
|
||||
|
||||
// 检测是否是新安装
|
||||
if(file_exists("./install") && !file_exists("./install/install.lock")){
|
||||
$url=$_SERVER['HTTP_HOST'].trim($_SERVER['SCRIPT_NAME'],'index.php').'install/index.php';
|
||||
header("Location:http://$url");
|
||||
die;
|
||||
}
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// 执行HTTP应用并响应
|
||||
|
||||
Reference in New Issue
Block a user