如何通过我的PHP脚本访问我的根文件夹?

时间:2010-09-26 16:29:20

标签: php

我在另一个名为ajax的文件夹中的文件中包含此函数,但它让我访问此包含文件:

include("includes/connect.php");

我不知道该怎么做,谢谢,我正在使用localhost?

Warning: include(includes/connect.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\final\ajax\moreProfileUpdates.php on line 2

1 个答案:

答案 0 :(得分:1)

您的include()函数正在尝试查找不存在的ajax / includes / connect.php。 尝试将其更改为:

// assumes 'includes' directory is one directory up from the 'ajax' directory
include '../includes/connect.php';