getaway
getaway

Reputation: 8990

how do i access my root folders, through my php script?

i have this include function in a file inside another folder called ajax, but it wnt let me access this include file:

include("includes/connect.php");

i dont know what to do, thanks, and im using 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

Upvotes: 0

Views: 83

Answers (1)

chigley
chigley

Reputation: 2592

Your include() function is trying to locate ajax/includes/connect.php, which doesn't exist. Try changing it to:

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

Upvotes: 1

Related Questions