makenoiz Posted February 8, 2011 Share Posted February 8, 2011 Can someone tell me what some of the purposes of this would be? global $PHP_SELF; its defined right after a function like this function myFunction(module =' '){ global $PHP_SELF; .... } Thanks Quote Link to comment https://forums.phpfreaks.com/topic/227014-global-php_self-purpose/ Share on other sites More sharing options...
requinix Posted February 8, 2011 Share Posted February 8, 2011 It's something to do with register_globals. There used to be a variable called $PHP_SELF (which PHP created automatically) and you'd need the global keyword to access it from within a function. But a) register_globals is bad and should not be enabled, and b) PHP_SELF is insecure (unless you know what you're doing with it). Quote Link to comment https://forums.phpfreaks.com/topic/227014-global-php_self-purpose/#findComment-1171263 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.