Basic php include pathing issue


#1

Hi all,

I apologize for what seems like a trivial question, but for some reason I cannot find the answer and it has stumped me good.

Backstory: I work on a dedicated rackspace server at work, so I don’t know of this is a shared server issue or I’m just really that oblivious right now.

Issue: I’m trying to set up a cms and I want to include a setup file (db connections, site variables, etc) in my “_includes” subfolder at the top of every page. At work, I can usually type “/whatever” and the path starts again at the root so no matter how deep I get, include("/whatever"); works.

basically, this

include("/_includes/setup.php");

works on any page.

note: I apologize for ignorance and database login details are not in my include.php :slight_smile:


#2

[url=http://php.net/include_path]Details.[/url]

Details.


#3

You’ll have to smack me in the face with it. After reading php.net and some guess and check I’m still at a loss.