Re: file include relative file addressing.

From: Date: Sun, 08 Sep 2002 13:11:08 +0000
Subject: Re: file include relative file addressing.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115665@lists.php.net to get a copy of this message
??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" <nelr@blueyonder.co.uk> wrote in message news:20020908113437.38418.qmail@pb1.pair.com... > From the root of a website: / > > I had a file called /my.php which included a file /include/blah/my.inc.php > > In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works > fine > when my.php is in the root of the site. > > If I move /my.php to /blah/my.php, no matter how I address > ../include/blah/my.php or /include/blah/my.php I keep getting path errors. > > How do I get around this problem using only relative paths (no absolute or > placing in an include path) > > Neil. > >

« previous php.general (#115665) next »