note 56622 deleted from function.include by aidan

From: Date: Sat, 15 Apr 2006 16:32:50 +0000
Subject: note 56622 deleted from function.include by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108157@lists.php.net to get a copy of this message
Note Submitter: Arnb ---- I have my secondary PHP scripts in a Directory named PHP off the main Directory path on my Web Host's Linux server and was losing my mind getting Include() to to work from the secondary directory. This solution also preserves the base directory as searchable for Include(). Take a look at function set_include_path and the user comments for more information. This code works for me where Foo.php is in http://Someurl.org/PHP/Foo.php <?php $path = './PHP/'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); include ('Foo.php'); <? All dotted and slashed incarnatsion of this with the exception of the full http path, which did not seem to get my Global Variables, never worked for me include ('./PHP/Foo.php');

« previous php.notes (#108157) next »