php include() and directory problems
Moderator: General Moderators
-
sportsdude11751
- Forum Newbie
- Posts: 4
- Joined: Sun Jul 15, 2007 11:39 am
php include() and directory problems
hey..how do you manage your files on your web server..for example i was on my main directory and that's where I kept my index.php, so something like http://www.whatever.com/index.php, then on that page i have a link that takes me to another directory like.. http://www.whatever.com/SSide/registerUser.php . BUT, when I try and include("stuff.php"); on register user, It can't find it. So i changed to inclue("../direcName/fileName.php") and it worked, BUT - here's the problem, that file that I include, also includes a file, but it can't get to it because it's not in the right directory, and I can't put a ../ before it because it works if your in one directory but not the other..how could i fix that?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
get_include_path() and set_include_path() may be of interest along with the PATH_SEPARATOR constant.
-
sportsdude11751
- Forum Newbie
- Posts: 4
- Joined: Sun Jul 15, 2007 11:39 am