2012-04-05 86 views
16

我從海外承包商那裏繼承了代碼。 CakePHP的版本我看到的是:CakePHP的版本號

CakePHP的v 0.2.9

凡在做到這一點適合?它是否早於1.0或者這是否約定2.0?

+0

你從哪裏看到的? – deceze 2012-04-05 04:09:24

+3

0.2.9是「since」,即當類/文件首次被引入時 – Costa 2012-04-05 07:55:25

回答

38

簡單的方法是

echo Configure::version(); 
+0

很棒的回答......... – VishalParkash 2017-01-05 08:28:32

59

Cake 2.0的當前版本號可以在/path/to/cake/lib/Cake/VERSION.txt中找到。 txt文件包含一個包含文件描述的註釋塊(聲明它自從Cake 0.2.9以來一直存在),後面跟着實際的版本號。

在Cake 1.3中的​​中可以找到相同的文件。

下面是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 
+2

這應該是被接受的答案。 – 2014-02-13 08:24:51

1

爲最好的辦法就是命令\蛋糕版本cammand會。顯示您使用的cakephp版本。