I've tried adding variables to the $_SERVER variable, to no avail. It accepts an assignment just fine, but doesn't recognise the key on the following page.
I know web servers are stateless, but there are mechanisms in other languages that perform this kind of function (the SERVER variable in ASP, for example, if I remember correctly) so I'm hoping I just missed something in the manual.
test01.php:
-----------
$_SERVER["myobject"]="steve";
?>
test02.php:
-----------
echo $_SERVER["myobject"];
?>
2007-02-19
07:31:38
·
1 answers
·
asked by
dead_elves
3
in
Computers & Internet
➔ Programming & Design
Basically I want to build a men structure dynamically from a directory+subdirectory listing. Since it'll be the same for every page, I was hoping to save some server overhead by only doing it once.
I don't think the session variable would work, because I'm already using that to track users from page to page. At best I could give each user his own menu object, but that would not save much on processing, since the site is built around a single ajax-type interface page. Additionally, I think the memory overheads of keeping the page structure stored separately for each user makes this unfeasable.
Normally I'd implement this as a servlet project, but customer requirements prevent that in this instance.
2007-02-19
20:30:51 ·
update #1