是否可以仅通过应用程序代码知道用于生成项目的CakePHP版本?
我的问题:
下载了一个用CakePHP做的工程,实在分不清用哪个Cake版本。文件说,例如
@version $Revision: 8004 $
,但这在某些文件中是不同的。我是否应该假设最高版本 (8004) 是正确的版本?
好像是2008年左右的,估计是1.x版本吧
PD:这里是项目的代码。
我发现 CakePHP 2.3.0 的版本保存在根 Cake 库下的静态文件中。
bash #: cat $CAKE_ROOT/lib/Cake/VERSION.txt
////////////////////////////////////////////////////////////////////////////////////////////////////
// +--------------------------------------------------------------------------------------------+ //
// CakePHP Version
//
// Holds a static string representing the current version of CakePHP
//
// CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
// Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
//
// Licensed under The MIT License
// Redistributions of files must retain the above copyright notice.
//
// @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
// @link http://cakephp.org
// @package cake.libs
// @since CakePHP(tm) v 0.2.9
// @license MIT License (http://www.opensource.org/licenses/mit-license.php)
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
2.3.0
编辑core.php,添加到顶部:
echo Configure::version();
对于 cakephp 3.x 查找 远藤