如何找到magento (magento版本1)版本(社区、企业或.GO)
提前感谢!!
发布于 2018-08-02 04:24:07
在Magento 1中,只需打开下一个文件app/Mage.php
并检查$_currentEdition
variable value:
$ 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']}", '.-');
}
...
快乐编码;)
https://stackoverflow.com/questions/51631374
复制相似问题