I have downloaded a php script software.
Was designed in them 'old days' when register_globals = ON
Now I do never run anything with registering globals = ON
and I probably never will.
I have searched and replaced these variables in all files in this software
Like this:
$HTTP_xxxx_VARS with $_xxxx
Where xxxx = SERVER, POST, GET, FILES or COOKIE
This is one of several functions in this software that have updated:
function uploadImg($img) {
global $_FILES;
global $_SERVER;
...
// original was:
function uploadImg($img) {
global $HTTP_FILES_VARS;
global $HTTP_SERVER_VARS;
...
Now my question is,
Should I use these variables, as globals?
I do not want more than necessary variables to be global.
Can I remove 'global' in front of $_FILES, in such functions?
Will they stop working, if I do that?
Thanks.