尝试在本地安装groupon clone的脚本时遇到问题。 我正在使用在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)。
答案 0 :(得分:1)
DOCUMENT_ROOT
常量未正确解析(我认为包含的文件未正确包含),PHP正在回退使用字符串DOCUMENT_ROOT
。