17

我从海外的老承包商那里继承了代码。我看到的 cakephp 版本是:

CakePHP v 0.2.9

这适合在哪里?它早于 1.0 还是这是一些 2.0 约定?

4

3 回答 3

59

Cake 2.0 的当前版本号可以在/path/to/cake/lib/Cake/VERSION.txt. txt 文件包含一个注释块,其中包含文件描述(说明它自 Cake 0.2.9 以来一直存在),后跟实际版本号。

相同的文件可以在 Cake 1.3 的/path/to/cake/cake/VERSION.txt.

以下是 2.0.5 的内容VERSION.txt

////////////////////////////////////////////////////////////////////////////////////////////////////
    // +--------------------------------------------------------------------------------------------+ //
    // CakePHP Version
    //
    // Holds a static string representing the current version of CakePHP
    //
    // CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
    // Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
    //
    // Licensed under The MIT License
    // Redistributions of files must retain the above copyright notice.
    //
    // @copyright     Copyright 2005-2011, 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.0.5
于 2012-04-05T06:36:34.493 回答
38

查找当前版本的最简单方法是

echo Configure::version();
于 2012-04-05T07:54:29.627 回答
1

最好的方法是 command .\cake version 这个 cammand 将显示你使用的 cakephp 版本。

于 2016-08-14T21:17:38.383 回答