I can't acces to the variable create un a specific file and using by another link by a third one.
Here is an example, I have 3 files:
testing.php
<?php
$special ="foo";
?>
other.php
<?php
echo $special; // that works
class Testing
{
public function toto()
{
echo $special;//Error considering as undefined
}
}
?>
main.php
<?php
require 'testing.php';
echo "require work $special";// that works
require 'other.php';
$a = new Testing();
$a->toto();//error
?>
So how can i acces to my variable $special
in the member of my class Testing.