rich gray wrote:
OK
No discussions on why register_globals has been removed we all understand why
and now have to live with that ... I'm not winging here!
The question is "Does anybody have an 'elegant' fix to quickly update a legacy
site that relies on globals to pass variables between page views?"
My original quick thought was simply to remap these variables as
$_SESSION['var'] so as not to get too deeply into the code base. I've used
that in a few quick fixes, but I'm not sure that it is acceptable? I have been
passing the variables via $_REQUEST but that obviously needs a lot more work
in the html generated, so the session approach would seem better? But needs to
observe the European rules on use of cookies :(
I'm thinking that what is needed is a sort of PEAR package that would simply
be added to every page and be provided with a list of variables to manage, so
all we need to do is scan the site for variables and establish which need to
be remembered. I've got all sorts of stuff from google/bing searches, but I'm
obviously not yet asking the right question ;) Has anybody already been down
that track?
IMO - this should be posted on PHP general not internals -- have you tried
extract() ?
http://fr2.php.net/extract
I'm specifically asking in relation to helping users migrate from PHP5.2 ...
trying to expand the documentation of making that process easier. Pointing at a
single manual page is a good example of why we need a more consistent support
for all those users who are not as computer literate as we would like. That
function may be a useful element of solving the problem, but it does not answer
the specific question asked?
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php