Re: On more time with PATHS!

From: Date: Mon, 21 Apr 2003 18:43:46 +0000
Subject: Re: On more time with PATHS!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144690@lists.php.net to get a copy of this message
----- Original Message ----- From: "C.R." <odcs@rogers.com> To: "PHP General" <php-general@lists.php.net> Sent: Monday, April 21, 2003 12:08 PM Subject: [PHP] On more time with PATHS! > You guys are probably getting tired of reading my emails, but this > path/include problem is just never ending. I don't even know how to explain > the problem because I don't understand it. I am simply trying to include > files that are in the same directory or directory structure, but no matter > what I do I get the same damn message that this or that file can't be > found - I have tried giving it the exact path, the exact url, and anything > else I can think of - but somewhere along the line - some file won't be > found. > > I think the problem is this, but I have no idea how to solve it. If I > include a file which also includes other files - then the path structure > somehow gets screwed up. How do I keep them straight through multiple > includes and directories. I don't know if I am making any sense - but this > is my last ditch effrot on this before I move on to some other way of doing > this - whether it be java, asp, or whatever. > > Everyone in here has been great, but I am to the point now where I am just > fed up with PHP because of this bloody issue. > > Thanks > > C.R. Use the absolute path beginning from the account's root directory. echo $_SERVER['DOCUMENT_ROOT']; So if you need to go back one directory and then into a folder called "functions" you'd simply do.. <? // include test $root = $_SERVER['DOCUMENT_ROOT']."/"; include($root."../functions/myfunctions.php"); ?> Got it? Good luck. :) - Kevin

« previous php.general (#144690) next »