PDA

View Full Version : Trouble when I require global.php


bigtime
03-02-2005, 06:03 PM
Hi,

This code works to print out the value of $test:


<?
session_start();
include ("config.php");

$test = "this is a test";

chdir("../$vb_dir/");

echo "$test";

require('./global.php');

///CODE goes on from here.......................


When I try to echo the value for $test after global.php has been required it doesn't echo the value for $test?

This doesn't work:

<?
session_start();
include ("config.php");

$test = "this is a test";

chdir("../$vb_dir/");

require('./global.php');

echo "$test";

///CODE goes on from here.......................


How can I get the value for $test to echo after I require global.php?

Thanks,

Tim

Dean C
03-02-2005, 08:20 PM
I believe global.php unsets all variables as a security measure :)

bigtime
03-03-2005, 02:43 AM
Thanks for your reply.

Tim

Dean C
03-03-2005, 01:33 PM
Good luck Tim :)