From 99c30392ea171bb6388d52c6a397b560995ec46d Mon Sep 17 00:00:00 2001 From: WispX <1591788658@qq.com> Date: Sat, 16 Feb 2019 13:01:42 +0800 Subject: [PATCH] fix --- extend/strategy/driver/Local.php | 2 +- public/index.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extend/strategy/driver/Local.php b/extend/strategy/driver/Local.php index 5968c18f..a6906f54 100644 --- a/extend/strategy/driver/Local.php +++ b/extend/strategy/driver/Local.php @@ -45,7 +45,7 @@ class Local implements Driver */ public function __construct($options = []) { - $this->rootPath = Env::get('root_path') . 'public' . DIRECTORY_SEPARATOR; + $this->rootPath = ROOT_PATH; $this->options = $options; } diff --git a/public/index.php b/public/index.php index 06710123..05fa682c 100644 --- a/public/index.php +++ b/public/index.php @@ -12,6 +12,8 @@ // [ 应用入口文件 ] namespace think; +define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR); + // 加载基础文件 require __DIR__ . '/../thinkphp/base.php';