没有在php中找到这样的文件或目录

时间:2012-05-15 10:23:22

标签: php

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

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

2 个答案:

答案 0 :(得分:0)

你的phpbb安装在这里" C:\ xampp \ htdocs \ alice \" ?

你应该设置$phpbb_root_path='../../../';

答案 1 :(得分:0)

我通过编写包含$ _SERVER ['DOCUMENT_ROOT']

的include语句来解决这个问题
include $_SERVER['DOCUMENT_ROOT'] . "includes/functions.php";

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