Using the $_SERVER super global in an extension causes the following guideline error
Direct use of $_SERVER Superglobal detected
I know the alternative for Magento 2 but how do you solve this for Magento 1?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
To access a variable globally, you can use session in magento1.
$session = Mage::getSingleton("core/session"); $session->setData("your_variable", "your value"); // Now you can retrieve your data elsewhere or even after the next request: $session = Mage::getSingleton("core/session"); $yourVariable = $session->getData("your_variable");