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

i have been trying to include the files using the code:

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);

I am getting the following error and i have been scratching my head for quite a while now ,don't know here am i going wrong

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

Does your phpbb install live here "C:\xampp\htdocs\alice\" ?

Should you infact set $phpbb_root_path='../../../';

I sorted this problem by writing my include statement by including a $_SERVER['DOCUMENT_ROOT']

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

As for why this works, im not so sure.