Rob Ziere wrote:
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
You could try calling a var with global first
global $variable
(reference: http://nl2.php.net/global )
$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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php