0

我在尝试在本地安装 groupon 克隆的脚本时遇到问题。我使用在 windows7 中运行的 XAMPP

Apache/2.2.17 (Win32) mod_ssl/2.2.17 
OpenSSL/0.9.8o 
PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625

这就是我尝试运行 index.php 的原因:

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config\Container.php on line 111


Warning: require_once(DOCUMENT_ROOT/system/plugins/common.php) [function.require-once]: failed to open stream: No such file or directory in C:\Users\xxxx\Documents\Eclipse\xxxx\system\includes\library.inc.php on line 17

Fatal error: require_once() [function.require]: Failed opening required 'DOCUMENT_ROOT/system/plugins/common.php' (include_path='.;C:\xampp\php\PEAR') in C:\Users\xxxx\Documents\Eclipse\xxxx\system\includes\library.inc.php on line 17

php 文件的开头是这样的:

session_start();
require_once ('config.php');        // this is the one that defines DOCUMENT_ROOT
require_once ('functions.php');
require_once ('functions_theme.php');
require_once ('fns.php');

这是第 17 行:

    require_once (DOCUMENT_ROOT.'/system/plugins/common.php');

DOCUMENT_ROOT 在之前加载的 config.php 文件中定义如下:

define("DOCUMENT_ROOT",$_SERVER['DOCUMENT_ROOT']);

希望有人可以提供帮助。

是的,该文件位于该目录中(已经检查过:P)。

4

1 回答 1

1

DOCUMENT_ROOT常量未正确解析(我认为您包含的定义它的文件未正确包含)并且 PHP 正在回退到使用 string DOCUMENT_ROOT

于 2011-12-16T00:20:53.270 回答