Bug or programmer-error?
| From: | Rob Ziere | Date: | Sat, 06 Aug 2005 14:34:41 +0000 |
| Subject: | Bug or programmer-error? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-220143@lists.php.net to get a copy of this message | ||
Dear PHP_friends,
I have found a strange behaviour of the "include" function.
Here it is .
// 1. this works fine
include ("../../gps_info/fetch_fields.php");
// 2. this works fine
$doc_root=$_SERVER[DOCUMENT_ROOT];
include
("$doc_root"."/pages/gps_info/fetch_fields.php");
// 3. this open the doc fetch_fields.php allright, but variables
that have been set outside fetchfields.php are not available within
fetch_fields.php
$root= 'webserver-2';
include
("$root"."/pages/gps_info/fetch_fields.php");
Does anybody have a clou as to what's wrong here?
Best regards/ Met vriendelijke groet,
Rob Ziere
Webmaster/beheerder GO-GPS.nl, alles over GPS en wandelen
http://www.go-gps.nl