Suppose I have the following code:
a.php
<?
class H{
public $i = 123;
public function S(){
require "b.php";
die;
}
}
$i = new H();
$i -> S();
b.php
<?
echo $i->i;
However, system throws an error in file b.php that variable i is not defined.
How can I fix this problem?
If it's possible, could someone kindly tell me why this is happening?
includeorrequire