如何查找magento(在magento版本1中)版本(社区,企业或.GO)
提前谢谢!
答案 0 :(得分:1)
在Magento 1中,只需打开下一个文件app/Mage.php
并检查$_currentEdition
变量值:
$ cat YOUR_MAGENTO_ROOT/app/Mage.php | grep _currentEdition
或者只是深入研究源代码:
...
static private $_isInstalled;
/**
* Magento edition constants
*/
const EDITION_COMMUNITY = 'Community';
const EDITION_ENTERPRISE = 'Enterprise';
const EDITION_PROFESSIONAL = 'Professional';
const EDITION_GO = 'Go';
/**
* Current Magento edition.
*
* @var string
* @static
*/
static private $_currentEdition = self::EDITION_COMMUNITY;
/**
* Gets the current Magento version string
* @link http://www.magentocommerce.com/blog/new-community-edition-release-process/
*
* @return string
*/
public static function getVersion()
{
$i = self::getVersionInfo();
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "")
. "-{$i['stability']}{$i['number']}", '.-');
}
...
快乐编码;)