$GLOBALS behaving erratic on host

Discussion in 'PHP' started by annunaki10, Oct 25, 2008.

  1. #1
    I use the $GLOBALS variable for one of my sites.
    When I set a value as, $GLOBALS['local'] = 1;
    On my localhost, I can use $GLOBALS['local'] anywhere and the value is preserved.

    However, when I upload this onto my host, that's not how it's set. When running on my host, this variable would be $GLOBALS['GLOBALS']['local']; For whatever reason, it takes everything that was in the GLOBALS array and moves it.

    Having code check for this is a pain in the butt. Is this normal behavior? Do i have to change a setting on my host?

    Thanks
     
    annunaki10, Oct 25, 2008 IP