include("../file.inc");
| From: | Matthew Ralston | Date: | Fri, 11 May 2001 10:39:30 +0000 |
| Subject: | include("../file.inc"); | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-52441@lists.php.net to get a copy of this message | ||
How do you include or require a file that is above the current script in the
directory hierarchy? For example how would I include or require a file whose
path is "../file.inc" relative to the current script? I tried all of:
include("../file.inc");
require("../file.inc");
include("/file.inc");
require("/file.inc");
include("..\file.inc");
require("..\file.inc");
include("\file.inc");
require("\file.inc");
but it doen't like any of them. :(
I don't want to use a full path relative to the root of the drive or
webserver folder because the included file and the script may move as the
development server is setup differently to the real web server.
Any ideas?
--
Thanks,
Matt
matthew.ralston@haltoncollege.ac.uk
< www.mralston.co.uk />