According to many sources, register_globals (global variables that is) should be disables in your php.ini.
Should I write define() in my code and use constants if global variables are disabled? Are those even related?
According to many sources, register_globals (global variables that is) should be disables in your
Share
They are related in that they have global scope, but constants are meant to not change once defined, unlike global variables which the page can modify as it goes along. So just switching over to using define() instead of a global won’t help much.
It’s better if you refactor your methods to take the variables as parameters and rely on that to pass variables around.