i would like to make folders for its own languages.
as an example i have the file foo.php
. that file has a english version and a dutch version also.
therefor i created the directories /english/foo.php
and /dutch/foo.php
both files in that directories will be exactly the same as in the root folder.
in the root folder root/foo.php
i load a variable $var
that comes from an other file and directory that is called root/scripts/bar.php
in the file root/scripts/bar.php
i do use a header function:
if ($pref_language == 'zu'){
$header = 'english'.$_SERVER['PHP_SELF'];
$var = "xyz";
}
header ("location: $header");
the problem is that when i will open root/foo.php
the header function works as it should be but $var
wont be initialised on that headered direction. when i will open source code there is nothing for
<?php echo $var;?>
but when looking at the source code without headering the variable will be loaded.
so this is a little bit strange to me. if there is someone who could help me out i really appreciate.
thanks alot.
foo.php
– shiplu.mokadd.im Dec 12 '12 at 23:58foo.php
? – shiplu.mokadd.im Dec 13 '12 at 0:05