0

我一直在尝试使用代码包含文件:

define('IN_PHPBB', true);
$phpbb_root_path='./../../';
$iai_root_path = "./";
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
include($iai_root_path.'includes/constants.'.$phpEx);
include($iai_root_path.'includes/load_functions.'.$phpEx);

我收到以下错误,现在我已经摸不着头脑了,不知道我是不是错了

Warning: include(./../../extension.inc) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\alice\mods\iai\install.php on line 33

Warning: include() [function.include]: Failed opening './../../extension.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\alice\mods\iai\install.php on line 33

Notice: Undefined variable: phpEx in C:\xampp\htdocs\alice\mods\iai\install.php on line 34
4

2 回答 2

0

您的 phpbb 是否安装在这里 "C:\xampp\htdocs\alice\" ?

如果你事实上设置$phpbb_root_path='../../../';

于 2012-05-15T10:26:47.260 回答
0

我通过包含 $_SERVER['DOCUMENT_ROOT'] 编写包含语句来对这个问题进行排序

include $_SERVER['DOCUMENT_ROOT'] . "includes/functions.php";

至于为什么会这样,我不太确定。

于 2012-05-15T10:29:29.950 回答