Posted by Bonge Boo! on 10/22/05 16:21
I hope this is easy. I'm trying to move a load of code out from the "parent"
page into includes to make things a bit tidier.
I make a variable called $target from the $_SERVER[SCRIPT_NAME]; I then use
$target in a function run some tests against an array, if they match they do
some conditional code to make a navigation bar.
I thought I would be able to make $target a globalvariable so my include
scripts could then access it and use its value. However this didn't work.
Might be me being thick.
So the next approach would be to have the includes able to know what the
"parent" file was called, and then I could use that. Reading the manual
hasn't thrown up an obvious functions or global variables.
Anyone? Do I need to go back and find out why my global variable wasn't
working?
Navigation:
[Reply to this message]
|