Re: HELP: Nested include(...)'s take relative paths not intuitively

From: Date: Tue, 10 Feb 2004 19:21:00 +0000
Subject: Re: HELP: Nested include(...)'s take relative paths not intuitively
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-177310@lists.php.net to get a copy of this message
Hello Samuel, Tuesday, February 10, 2004, 6:55:24 PM, you wrote: SV> I have 3 files in nested subdirectories [snip] SV> Is this a bug or a feature? Neither, it's just logic really. The include() function sucks in the file specified, dropping out to HTML mode to do so. The included file inherits all of the properties of the one that included it, such as current directory location, variable scope, etc. The include function doesn't (and cannot) know you're including more PHP code. In short, never mess around with "../" in a directory of an include file, that's pretty bad structure anyway IMHO. -- Best regards, Richard mailto:rich@launchcode.co.uk

« previous php.general (#177310) next »