|
Posted by hrishikesh.mehendale on 04/10/06 23:24
Hi All, Sorry if I'm just repeating other questions, but I can't find
an answer for this particular problem: I have my main index.php file,
which looks so: <?php include "includes/header.php"; #defines a global
variable called $lang include "includes/functions.php"; # some required
functions safe_include "main_page.html"; # user-defined function that
tries to # include main_page.html.$lang
or gives a warning message echo "Language available to index.php at
line XYZ is -$lang-"; #-- to check empty value include
"includes/footer.php"; #page footer ?> and header.php looks so: <?php
global $lang; $lang = "en"; ?> footer.php looks like so: <?php echo
"Language is set to -$lang-"; # should print out current language in
use ?> Now the problem is, the $lang variable is available to all
statements in between, upto and including the safe_include statement.
Unfortunately, footer.php refuses to see the variable. What can be
the problem? Thanks Hrishikesh
Navigation:
[Reply to this message]
|