Re: [PHP] global scope issue

2003-08-14 Thread Ray Hunter
/dir1/script1.php ?php include(/dir1/script2.php); print_r($test); //works great print_r($GLOBALS['test']); //does not work ? Works fine for me when I have the include as include( 'script2.php' ); Make sure that the include is correct...I figure that you dont have dir1 off of the root

Re: [PHP] global scope issue

2003-08-14 Thread Robert Cummings
The script below works fine for me. Do you have track_vars set to On? I'm not 100% sure it's related, but it might be since I don't have any problem with your sample script. Cheers, Rob. On Wed, 2003-08-13 at 10:26, Shawn McKenzie wrote: I'm having problems using global vars. I have read the

[PHP] global scope issue

2003-08-14 Thread Shawn McKenzie
I'm having problems using global vars. I have read the docs and all of the notes but it's not helping. Simplified example: /dir1/script2.php ?php $test = array ( 'a' = '1', 'b' = '2'); ? /dir1/script1.php ?php include(/dir1/script2.php); print_r($test); //works great