Tuesday, 3 September 2013

How to access a variable across two files

How to access a variable across two files

I have three files - global.php, test.php, test1.php
Global.php has following variable $filename; $filename = "test";
I can read this variable from both test and test1 files by include
'global.php';
Now i want to set the value of $filename in test.php and the same value i
want to read in test1.php.
I tried with session variables as well but due to two different files i am
not able to capture the variable.
How to achieve this........
Thanks for help in advance.....

No comments:

Post a Comment