note 13173 deleted from function.include by sniper

From: Date: Wed, 29 Jan 2003 04:05:32 +0000
Subject: note 13173 deleted from function.include by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-42975@lists.php.net to get a copy of this message
After much frustration with the issue of no good way to do deep-nested includes, I've come up with a solution that will solve this: <?php chdir("dir/where/include/will/be/"); include("name_of_file_in_that_dir"); /* in the included file, if more included files are necessary, recusively repeat*/ chdir(".."); ?> This will completely allow you to do relative includes. Forget about the 'a referencing b, then b not able to reference c' crap. Just change your working directory!

« previous php.notes (#42975) next »