Re: include("../file.inc");

From: Date: Fri, 11 May 2001 16:41:05 +0000
Subject: Re: include("../file.inc");
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52481@lists.php.net to get a copy of this message
You may need to set your include_path to "." in php.ini. Than again maybe not. Try it. Then include "../file.inc" should work (on Unix or Linux, use "\" on Windows). Regards, Jakob Kruse ""Matthew Ralston"" <matthew.ralston@haltoncollege.ac.uk> wrote in message news:9dgfbo$kom$1@toye.p.sourceforge.net... > 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 /> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#52481) next »