From 3de026a83a4840729bc023a67d8078eb5da9b95a Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Mon, 7 Mar 2011 06:15:12 +0000 Subject: [PATCH] * set the webRoot in the config file. --- module/install/control.php | 1 + module/install/model.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/install/control.php b/module/install/control.php index 69f0163f01..6a9a8fa02b 100644 --- a/module/install/control.php +++ b/module/install/control.php @@ -21,6 +21,7 @@ class install extends control { if(!defined('IN_INSTALL')) die(); parent::__construct(); + $this->config->webRoot = $this->install->getWebRoot(); } /** diff --git a/module/install/model.php b/module/install/model.php index 5437503727..2399566551 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -144,7 +144,7 @@ class installModel extends model */ public function getWebRoot() { - return rtrim(str_replace('\\', '/', pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)), '/') . '/'; + return rtrim(str_replace('\\', '/', pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME)), '/') . '/'; } /**