从magento中的url获取传递参数

时间:2017-08-31 04:43:23

标签: php magento get magento-1.9

我在url中传递参数,我想在根文件中获取它。 我正在使用这段代码,但它什么也没给我。

require_once('../app/Mage.php');
umask(0);
Mage::app();

echo 'Store '.Mage::app()->getRequest()->getParam('store').'<br>';

如何从根文件中的url获取参数,即使$ _GET [&#39; store&#39;]也无效。

1 个答案:

答案 0 :(得分:0)

//请尝试使用以下代码。

error_reporting(E_ALL);
ini_set("display_errors", 1);
require_once('app/Mage.php'); // Please check that this file included.
umask(0);
Mage::app();

echo 'Store '.Mage::app()->getRequest()->getParam('store').'<br>';
相关问题