I can not access the global variable in function in included file
<p>I can not access the global variable in function in included file</p>

<p>sample files : <a href="http://dl.dropbox.com/u/9486036/similasyon.zip" rel="nofollow">dl.dropbox.com/u/9486036/similasyon.zip</a></p>

<p><strong>simulations:</strong></p>

<p><strong>index.php:</strong></p>

<pre><code>&lt;?

function init(){
    include "init.php";
}

init();

?&gt;
</code></pre>

<p><strong>init.php:</strong></p>

<pre><code>&lt;?

$data = "data_string";

echo "Data-test in ".__FILE__.": &lt;b&gt;".$data."&lt;/b&gt;&lt;br /&gt;\r\n"; 

include "php/funcs.php";

?&gt;
</code></pre>

<p><strong>funcs.php:</strong></p>

<pre><code>&lt;? 

echo "Data-test in ".__FILE__.": &lt;b&gt;".$data."&lt;/b&gt;&lt;br /&gt;\r\n";

function func_load()
{
    global $data;
    echo "Data-test in ".__FILE__." in function func_load(): &lt;b&gt;".$data."&lt;/b&gt;&lt;br /&gt;\r\n";

    include dirname(__FILE__)."/funcs/sub_func.php";
}

func_load();

?&gt;
</code></pre>

<p><strong>sub_func.php:</strong></p>

<pre><code>&lt;? 
    echo "Data-test in ".__FILE__.": &lt;b&gt;".$data."&lt;/b&gt;&lt;br /&gt;\r\n";
?&gt;
</code></pre>

<p><strong>screen output:</strong></p>

<pre><code>Data-test in \similasyon\init.php                             : data_string 
Data-test in \similasyon\php\funcs.php                        : data_string 
Data-test in \similasyon\php\funcs.php in function func_load():  
Data-test in \similasyon\php\funcs\sub_func.php               :
</code></pre>
