0
我嘗試在本地安裝groupon克隆的腳本時出現問題。 即時通訊使用XAMPP在Windows7PHP安裝警告:[function.require-once]:未能打開流
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']);
希望有人可以提供幫助。
並且YES,該文件在該目錄中(已經檢查過:P)。
明顯沒有包含其他PHP文件,或者該行未被運行。 – Kenaniah 2011-12-16 00:19:25
在你試圖包含你的文件之前,你確定包含`define`語句的文件真的被加載嗎? 'Warning:require_once(DOCUMENT_ROOT/system/plugins/common.php)`部分似乎告訴'DOCUMENT_ROOT`尚未定義。 – Cyclonecode 2011-12-16 00:22:58